home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_m_p / pwez51.zip / WIND_REZ.DOC < prev   
Text File  |  1992-04-01  |  246KB  |  6,469 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.                                 WINDOWS R-E-Z
  26.                                 VER. 5.10
  27.  
  28.  
  29.                                 CONNECT Software
  30.                                 6192 Fawn Meadow
  31.                                 Farmington, NY   14425
  32.  
  33.                                 Richard Magnanti
  34.                                 (716) 924-3439
  35.  
  36.                                 CPS:    71020,2040
  37.                                 GENIE:  R.MAGNANTI
  38.                                 DELPHI: MAGNANTI
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.                                COPYRIGHT (c) 1988 - 1992 BY:
  50.                                CONNECT Software
  51.                                ALL RIGHTS RESERVED
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.                                     CONTENTS
  74.  
  75.           Differences in versions of WINDOWS R-E-Z ----------------- 1
  76.  
  77.           Important notes for BASIC 7.0/7.1 ( PDS ) users.---------- 2
  78.           Important notes for UNENHANCED versions. ----------------- 3
  79.  
  80.           General overview ( list of procedures included ) ------- 4-7
  81.  
  82.           System and programming requirements ---------------------- 8
  83.  
  84.           Windowing routines ------------------------------------ 9-17
  85.                    The Active Window ------------------------------- 9
  86.              1.00  SETWIND -------------------------------------- 9-10
  87.              1.01  MAKEWIND ------------------------------------ 10-12
  88.              1.02  CHNGWIND --------------------------------------- 12
  89.              1.03  PRINTW ----------------------------------------- 12
  90.              1.04  SAVEWIND ------------------------------------ 12-13
  91.              1.05  RESAVE -------------------------------------- 13-14
  92.              1.06  RSTRWIND --------------------------------------- 14
  93.              1.07  DELWIND ---------------------------------------- 14
  94.              1.08  CLRWIND --------------------------------------14-15
  95.              1.09  NEWCOLOR --------------------------------------- 15
  96.              1.10  LINEW ------------------------------------------ 15
  97.              1.11  WAVAIL% ---------------------------------------- 16
  98.              1.12  WINDSTATUS ------------------------------------- 17
  99.  
  100.           Pulldown windows ------------------------------------- 18-26
  101.              2.00  SETPULL ------------------------------------- 18-20
  102.                    Example: SETPULL ---------------------------- 20-21
  103.              2.01  PULLDOWN ------------------------------------ 21-25
  104.              2.02  RSTRPULL ------------------------------------ 25-26
  105.              2.03  CHNGPULL --------------------------------------- 26
  106.  
  107.           Scroll windows --------------------------------------- 27-46
  108.              3.00  SETSCRL ------------------------------------- 27-28
  109.              3.01  SCRLWIND ------------------------------------ 28-35
  110.                    SCRLWIND example ( Auto-exit ) -------------- 35-36
  111.              3.02  B4SCRL -------------------------------------- 37-45
  112.              3.03  MARKED% ------------------------------------- 45-46
  113.  
  114.           Get answer routine ----------------------------------- 47-48
  115.              4.00  GETANS -------------------------------------- 47-48
  116.  
  117.           Input routines --------------------------------------- 49-64
  118.              5.00  INPTINIT ------------------------------------ 49-50
  119.              5.01  INPTWIND ------------------------------------ 50-53
  120.              5.02  RSTRINPT ------------------------------------ 53-54
  121.                    Example: INPTWIND ------------------------------ 55
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.              5.03  SETINPT ------------------------------------- 56-57
  140.                    Example: SETINPT ---------------------------- 58-59
  141.              5.04  MULTINPT ------------------------------------ 59-63
  142.                    Editing features for input routines ------------ 64
  143.           Directory routines ----------------------------------- 65-70
  144.              6.00  GETDISK ---------------------------------------- 65
  145.              6.01  FINDPATH --------------------------------------- 65
  146.              6.02  SETDISK ---------------------------------------- 65
  147.              6.03  DISKSIZE --------------------------------------- 66
  148.              6.04  FINDDIR ------------------------------------- 66-68
  149.                    A directory scroll window ( example ) ------- 69-70
  150.  
  151.           Keyboard and Mouse routines -------------------------- 71-72
  152.              7.00  KEYMOUSE% -------------------------------------- 71
  153.                    KEYMOUSE% example ------------------------------ 71
  154.              7.01  MBUTTONS --------------------------------------- 72
  155.              7.02  MOUSEON ---------------------------------------- 72
  156.  
  157.           Sound Routine ------------------------------------------- 72
  158.              9.00  DOSOUND ---------------------------------------- 72
  159.  
  160.           Information line routines ---------------------------- 73-77
  161.              10.00 INFOLINE --------------------------------------- 73
  162.              10.01 PRINTINFO ----------------------------------- 73-74
  163.              10.02 INFOFIXED -------------------------------------- 74
  164.              10.03 RSTRINFO --------------------------------------- 74
  165.                    Examples: Info-line routines ---------------- 75-77
  166.  
  167.           Program format --------------------------------------- 78-81
  168.  
  169.           Making a customized library ----------------------------- 82
  170.  
  171.           Description of files --------------------------------- 83-85
  172.  
  173.           Errors ----------------------------------------------- 86-90
  174.  
  175.           Appendix --------------------------------------------- 91-94
  176.              Color attribute chart -------------------------------- 91
  177.              Multi-field code chart ------------------------------- 92
  178.              Border designation chart ----------------------------- 93
  179.              Keymouse code values --------------------------------- 94
  180.  
  181.           Restrictions and disclaimer ----------------------------- 95
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                             ***************************
  206.                             *  NOTE ------ READ THIS! *
  207.                             ***************************
  208.  
  209.               The information in this documentation refers to the
  210.           enhanced version of WINDOWS R-E-Z.  Differences between the
  211.           QuickBasic ( 4.00, 4.00b and 4.50 ) and the BASIC 7.+ (PDS)
  212.           versions are detailed.  The documentation can be used for the
  213.           unenhanced versions with the following exceptions.
  214.  
  215.  
  216.               1. MULTI-FIELD INPUT SCREENS - A maximum of 4 input
  217.           screens with a maximum of 25 fields per screen are available
  218.           in the unenhanced version.  This compares to 10 multi-field
  219.           screens with up to 150 fields each, in the enhanced version.
  220.  
  221.               2. MEMORY - The code in the unenhanced libraries is not
  222.           modular.  Therefore executable programs made with the unen-
  223.           hanced libraries will contain all of the code even though
  224.           all of the procedures are not used.  This will substantially
  225.           increase the length of any executable file and program.
  226.               With the enhanced versions of WINDOWS R-E-Z, it is not
  227.           necessary to link modules to executable programs if routines
  228.           in a module are not used by the program.  Much smaller ex-
  229.           ecutable programs are consequently possible.
  230.               An additional library is included in the enhanced
  231.           versions which does not contain error checking or window
  232.           status capability.  This library can be used after the
  233.           program is de-bugged and also represents an opportunity for
  234.           considerable memory reduction.
  235.  
  236.               3. The BASIC 7.0/7.1 unenhanced version does not allow
  237.           the use of unnamed ( blank ) COMMON blocks.  The enhanced
  238.           version has provisions for the use of same.
  239.  
  240.               4. The section labeled "MAKING A CUSTOMIZED LIBRARY"
  241.           refers to the enhanced version of WINDOWS R-E-Z.
  242.  
  243.  
  244.           **********************************************************
  245.           **  For information on obtaining the enhanced version   **
  246.           **  of WINDOWS R-E-Z see the file ORDER.ME.             **
  247.           **********************************************************
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                        1
  261.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                Important notes for BASIC 7.0/7.1 ( PDS ) users.
  272.  
  273.  
  274.           ENHANCED AND UNENHANCED VERSIONS:
  275.  
  276.           The /Ea option may be used when loading QBX.  This allows
  277.           the use of expanded memory.
  278.  
  279.           Window memory resides in a separate segment of string space
  280.           reserved for strings placed in unnamed ( blank ) COMMON
  281.           blocks.  DO NOT USE BLANK COMMON BLOCKS IN YOUR PROGRAM.
  282.  
  283.           EXAMPLE: COMMON SHARED A$                ' NOT PERMITTED
  284.                    COMMON SHARED /BLOCKNAME/ A$    ' PERMITTED
  285.  
  286.           Maximum window memory is 64k bytes.  Calls to MAKEWIND or
  287.           SAVEWIND requesting window memory in excess of 64k bytes
  288.           will result in an "Out of string space" error message.  As
  289.           64k represents sixteen full display windows (80 column mode)
  290.           this limitation should not be restrictive.
  291.  
  292.           The use of far strings is required.  This is the default for
  293.           programs compiled from the QBX environment.   If the source
  294.           code is compiled on the command line the /Fs option must be
  295.           used with BC.
  296.  
  297.  
  298.           ENHANCED VERSION ONLY:
  299.  
  300.           An additional object file PDSMEM70/71.OBJ is included which
  301.           allows the use of unnamed (blank) COMMON blocks. It must re-
  302.           place the object file PDSMEM.OBJ which is included in the
  303.           libraries.  Window memory will share main module string
  304.           space after this change is made.  To make this change;
  305.  
  306.           1. Make new library files. ( Save old library files! )
  307.  
  308.           LIB PDSALL70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  309.           LIB PDSNER70.LIB-PDSMEM.OBJ+PDSMEM70.OBJ;     ( BASIC 7.0 )
  310.  
  311.           LIB PDSALL71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  312.           LIB PDSNER71.LIB-PDSMEM.OBJ+PDSMEM71.OBJ;     ( BASIC 7.1 )
  313.  
  314.           2. Make new quick-libraries. ( Save old quick-libraries! )
  315.  
  316.           LINK/Q PDSALL70.LIB,PDSALL70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  317.           LINK/Q PDSNER70.LIB,PDSNER70.QLB,,QBXQLB.LIB; ( BASIC 7.0 )
  318.  
  319.           LINK/Q PDSALL71.LIB,PDSALL71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  320.           LINK/Q PDSNER71.LIB,PDSNER71.QLB,,QBXQLB.LIB; ( BASIC 7.1 )
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                        2
  327.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.            Inportant notes -- Unenhanced versions of WINDOWS R-E-Z.
  338.  
  339.  
  340.           QUICKBASIC 4.00/4.00b:
  341.  
  342.           The library in the unenhanced, QuickBASIC 4.++, version of
  343.           WINDOWS R-E-Z was made using QuickBASIC 4.50.  This may cause
  344.           keyboard problems ( BACKSPACE, "G" ) with users of QuickBASIC
  345.           4.00 and 4.00b in the QB editor.  This can be solved by making
  346.           a new quick library ( QB4UNEN.QLB ).
  347.  
  348.           For QB 4.00 make a new library using link:
  349.  
  350.           LINK/Q QB4UNEN.LIB, QB4UNEN.QLB,,BQLB40.LIB;
  351.  
  352.           For QB 4.00b make a new library using link:
  353.  
  354.           LINK/Q QB4UNEN.LIB, QB4UNEN.QLB,,BQLB41.LIB;
  355.  
  356.           A message stating the following will be issued.
  357.  
  358.           LINK WARNING L4051: BRUN45.LIB: CANNOT FIND LIBRARY
  359.           Enter new file spec:
  360.  
  361.           Press ENTER.  The file, BRUN45.LIB, is not required.
  362.  
  363.           Another massage stating the following will be issued.
  364.  
  365.           LINK: error L2029: Unresolved externals:
  366.  
  367.           FIDRQQ in file(s):                 ( Ignore this message )
  368.             ( several files will be listed )
  369.  
  370.           The ENHANCED version of WINDOWS R-E-Z provides libraries for
  371.           the user specified version of QuickBASIC.
  372.  
  373.  
  374.           BASIC 7.0:
  375.  
  376.           The library in the unenhanced, BASIC 7.0/7.1, version of
  377.           WINDOWS R-E-Z  was made using BASIC 7.1.  If you are using
  378.           BASIC 7.0 the following message will appear when making
  379.           executable programs from within the QBX environment.
  380.  
  381.           LINK WARNING L4051: BRT71EFR.LIB: CANNOT FIND LIBRARY
  382.           Enter new file spec:
  383.  
  384.           Press ENTER.  The file, BRT71EFR.LIB, is not required.
  385.  
  386.           The ENHANCED version of WINDOWS R-E-Z supplies libraries for
  387.           the user specified version of BASIC ( version 7.0 or 7.1 ).
  388.  
  389.  
  390.  
  391.  
  392.                                        3
  393.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                             *** GENERAL OVERVIEW ***
  404.  
  405.               WINDOWS R-E-Z is a collection of QuickBASIC and assembly
  406.           routines which provide users of QuickBASIC ver. 4.00+ and
  407.           BASIC 7.0+ ( PDS ) with a complete window management system.
  408.           With WINDOWS R-E-Z users can make, save, restore, and delete
  409.           up to twenty windows.  The memory used to save windowed
  410.           areas is dynamically allocated and outside of basic's normal
  411.           data storage area leaving more room for the basic programs
  412.           data.  Windows are assigned a number from zero to twenty.
  413.  
  414.               "INPUT WINDOWS" and "MULTI-FIELD INPUT" routines are
  415.           also provided.  "INPUT WINDOWS" provide a convenient means
  416.           to prompt for, and receive an input.  "MULTI-FIELD INPUT"
  417.           allows users to define up to 10 input screens, each having up
  418.           to 150 input fields.  Numerous options are included for
  419.           input fields.
  420.  
  421.               WINDOWS R-E-Z provides users the ability to incorporate
  422.           "PULLDOWN WINDOWS", emulating those used in the QuickBASIC
  423.           programming environment, in their programs.
  424.  
  425.               Directory routines find the default drive and path, disk
  426.           size and free space, and directory listing for any path.
  427.           File size, date, time, and attributes can also be found.
  428.  
  429.               Information line routines provide an easy means to print
  430.           messages, directions, or prompts, anyplace on the display.
  431.  
  432.               Several other routines are included which allow the use
  433.           of "GET ANSWER WINDOWS" and "SCROLL WINDOWS".   The ability
  434.           to read KEYBOARD and MOUSE input is also provided with
  435.           WINDOWS R-E-Z.
  436.  
  437.               All of the routines require a minimal amount of initial-
  438.           ization and the resulting programs present a professional
  439.           appearance.
  440.  
  441.               Unlike many other basic "add-ons", WINDOWS R-E-Z
  442.           provides extensive error detection and reporting.
  443.  
  444.           Procedures included:
  445.  
  446.             SETWIND -------- Set up routine for windowing procedures.
  447.  
  448.             MAKEWIND ------- Makes a window.  Saves windowed area to
  449.                              window memory.  The window becomes the
  450.                              "active window".
  451.  
  452.             SAVEWIND ------- Saves a screen area to window memory.
  453.  
  454.             RESAVE --------- Saves the active window.
  455.  
  456.  
  457.  
  458.                                        4
  459.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.             RSTRWIND ------- Restores a window area to the display.
  470.  
  471.             DELWIND -------- Deletes a window area from window memory.
  472.  
  473.             CHNGWIND ------- Changes the active window to another
  474.                              window.
  475.  
  476.             NEWCOLOR ------- Changes the print-to color of the active
  477.                              window for text printed by PRINTW.
  478.                              The print-to color is used by CLRWIND to
  479.                              clear the active window's interior.
  480.  
  481.             CLRWIND -------- Clears the interior of the active window.
  482.  
  483.             PRINTW --------- Prints text in the active window using
  484.                              the window's "print-to" color.
  485.  
  486.             LINEW ---------- Prints a line in the active window using
  487.                              the window's "print-to" color.
  488.  
  489.             WAVAIL% -------- (FUNCTION) Reports a window's availability.
  490.  
  491.             WINDSTATUS ----- Reports window memory status.
  492.  
  493.             SETSCRL -------- Changes default attributes for calls to
  494.                              SCRLWIND.
  495.  
  496.             B4SCRL --------- Sets exit keys and "marked entry string"
  497.                              for a subsequent call to SCRLWIND.
  498.  
  499.             SCRLWIND ------- Places a scrollable list in the active
  500.                              window.
  501.  
  502.             MARKED% -------- (FUNCTION) Returns position of marked
  503.                              items after a call to SCRLWIND.
  504.  
  505.             SETPULL -------- Set up routine for pulldown windows.
  506.  
  507.             PULLDOWN ------- Makes pulldown windows.  On exit the
  508.                              displayed pulldown window is the active
  509.                              pulldown window.
  510.  
  511.             RSTRPULL ------- Restores the area under the active
  512.                              pulldown window and menubar.  Deactivates
  513.                              the active pulldown window.
  514.  
  515.             CHNGPULL ------- Changes the color of, and disables or
  516.                              enables an item in a pulldown window.
  517.  
  518.             INPTINIT ------- Initializes input memory. Sets date format,
  519.                              decimal designator, and "exit keys".
  520.  
  521.  
  522.  
  523.  
  524.                                        5
  525.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.             INPTWIND ------- Makes an input field with an optional
  536.                              window.  The field can be edited by
  537.                              the user.  On exit the displayed input
  538.                              line or window is the active input window.
  539.  
  540.  
  541.             RSTRINPT ------- Restores the area under the active input
  542.                              window to the display.  Deactivates the
  543.                              active input window.
  544.  
  545.             SETINPT -------- Set up routine for multi-field input
  546.                              screens.
  547.  
  548.             MULTINPT ------- Places input fields on the screen as
  549.                              defined by a previous call to SETINPT.
  550.  
  551.             INFOLINE ------- Sets coordinates and color for the info-line.
  552.                              Also turns on the info-line.  Saves the area
  553.                              of the display reserved by the info-line. The
  554.                              info-line displays a prompt or message.
  555.  
  556.             PRINTINFO ------ Prints a prompt or message in the info-line.
  557.  
  558.             INFOFIXED ------ Defines a fixed string for the info-line. The
  559.                              string is printed every time PRINTINFO is
  560.                              called.  The string specified in PRINTINFO is
  561.                              added to the string defined in this routine.
  562.                              Useful for scroll and pulldown windows.
  563.  
  564.             RSTRINFO ------- Restores the display area under, and option-
  565.                              ally turns off the info-line.
  566.  
  567.             GETANS --------- Makes a get answer window or single line
  568.                              prompt.  Waits for a single key response.
  569.  
  570.             DOSOUND -------- Produces sound determined by SETWIND.
  571.  
  572.             GETDISK -------- Returns the default disk drive.
  573.  
  574.             SETDISK -------- Sets the default disk drive.
  575.  
  576.             FINDPATH ------- Returns the default path for any drive
  577.                              ( current directory ).
  578.  
  579.             DISKSIZE ------- Returns disk size and free space.
  580.  
  581.             FINDDIR -------- Returns the directory of any drive or path
  582.                              in a string array.
  583.  
  584.             KEYMOUSE% ------ (FUNCTION) Waits for keyboard or mouse
  585.                              input, or mouse movement.  Returns a code
  586.                              for the key pressed or mouse movement.
  587.  
  588.  
  589.  
  590.                                        6
  591.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.             MBUTTONS ------- Redefines the mouse buttons.
  602.  
  603.             MOUSEON -------- Turns the mouse on, off, or disables
  604.                              movement detection.
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.                                        7
  657.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.             --------------------------------------------------------
  668.  
  669.                   ***  SYSTEM AND PROGRAMMING REQUIREMENTS ***
  670.  
  671.             COMPUTER:
  672.                IBM PC (XT or AT) or compatible computer.  One disk drive.
  673.  
  674.             VIDEO ADAPTOR CARD:
  675.                MONO, CGA, EGA or VGA emulating CGA.
  676.  
  677.             PROGRAMMING LANGUAGE:
  678.                For the QB4.+ version;
  679.  
  680.                    QuickBASIC version 4.00 or greater.
  681.                     - Text mode
  682.  
  683.                For the BASIC 7.+ (PDS) version;
  684.  
  685.                    BASIC 7.0  or greater.
  686.                    - Text mode
  687.  
  688.                    - Requires use of "far strings". This is the default
  689.                      if executable programs are produced from within
  690.                      QBX.  If modules are compiled using BC on the command
  691.                      line ( outside of the QBX environment ) the /Fs option
  692.                      must be used.
  693.  
  694.             DOS: Version 2.1 or higher.
  695.  
  696.             -------------------------------------------------------
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                        8
  723.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                             USING WINDOWS R-E-Z
  734.  
  735.          THE ACTIVE WINDOW
  736.  
  737.          When a window is defined ( made ) the number assigned to it
  738.          by the programmer represents the area covered by the window.
  739.          The area is restored or deleted via it's "number".  Up to 20
  740.          window areas can be saved.  The memory used to save the
  741.          window areas is automatically managed by WINDOWS R-E-Z.
  742.  
  743.          Any time a window is made it becomes the "active" window. The
  744.          active window is used by the following routines.
  745.  
  746.               PRINTW --- Prints text in the active window.
  747.               LINEW ---- Prints a line in the active window.
  748.               SCRLWIND - Places a scrollable list in the active
  749.                          window.
  750.               CLRWIND -- Clears all text from the interior of the
  751.                          active window.
  752.               RESAVE  -- Saves the active window and any text in the
  753.                          active window.
  754.               NEWCOLOR - Changes the "print-to" color of the active
  755.                          window.
  756.  
  757.          NOTE: ACTIVE INPUT AND PULLDOWN WINDOWS MAY ALSO EXIST. THESE
  758.          WINDOWS ARE NOT RELATED TO THE ACTIVE WINDOW GENERATED BY THE
  759.          WINDOWING ROUTINES.
  760.  
  761.  
  762.          1.00 SETWIND ( FST%, SND%, SHAD% )
  763.  
  764.               Description:   SETWIND must be called at least once in
  765.               any program using the routines in WINDOWS-R-E-Z, prior
  766.               to calling the routines.  This procedure initializes
  767.               window memory.  It also sets the default windowing
  768.               speed, sound, and window shadow color.
  769.  
  770.               The first call to SETWIND initializes window memory and
  771.               sets the default parameters.  Subsequent calls to
  772.               SETWIND will not affect window memory but can be used
  773.               to change the default parameters.
  774.  
  775.               NOTE: IF A CLEAR STATEMENT IS EXECUTED BY THE PROGRAM
  776.               ALL WINDOW MEMORY IS LOST.  ANY WINDOW AREAS SAVED IN
  777.               WINDOW MEMORY ARE LOST.  SETWIND MUST BE CALLED AGAIN
  778.               TO RE-INITIALIZE WINDOW MEMORY AFTER EXECUTING A CLEAR
  779.               STATEMENT.
  780.  
  781.               Arguments:      FST% is used to allow "fast" windowing
  782.               if a CGA video card, or emulation, is detected.  If
  783.               FST% = 0  window routines will be slower on computers
  784.               with CGA.  If FST%  = 1 the window routines will be
  785.  
  786.  
  787.  
  788.                                        9
  789.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.               "fast" on computers with CGA.  This may, however, cause
  800.               "snow" with certain CGA cards.  If a monochrome card is
  801.               detected, FST% is ignored.  All windowing is "fast".
  802.  
  803.                                SND% determines which sound will be
  804.               generated by the routines.   If SND% = 1 a "CLICK" sound
  805.               will be generated.  If SND% = 2 a "BEEP" sound will be
  806.               produced.  Any other value produces no sound.
  807.  
  808.                                SHAD% sets the color for window shad-
  809.               ows.  See the color attribute chart for details.  Set-
  810.               ting SHAD% to 7 works well for monochrome displays while
  811.               setting SHAD% to 8 works well for color displays.
  812.  
  813.  
  814.          1.01 MAKEWIND (W%, LABEL$, TR%, LC%, WIDE%, NR%, ATTR%, BORBER%)
  815.  
  816.               Description:   Makes a window.  May also save a window-
  817.               ed area to window memory.  The window becomes the active
  818.               window.   Calls to PRINTW, LINEW, SCRLWIND, CLRWIND,
  819.               RESAVE, and NEWCOLOR refer to the active window.
  820.  
  821.               Arguments:   W% is the window number and must equal 0 to
  822.               20.  If W% = 0 the area under the window is not saved.
  823.               A window is simply made.  If W% is from 1 to 20 the area
  824.               under the window is saved and may be restored at a later
  825.               time via a call to RSTRWIND.  If W% is the number of a
  826.               window area previously saved by MAKEWIND or SAVEWIND an
  827.               error is reported.
  828.  
  829.               NOTE: WHEN WINDOW NUMBER 1 TO 20 IS MADE AN IMAGE OF THE
  830.               DISPLAY AREA UNDER THE WINDOW IS SAVED IN WINDOW MEMORY.
  831.               THIS AREA MAY BE RESTORED TO THE DISPLAY BY CALLING
  832.               ROUTINE RSTRWIND.  ROUTINE RSTRWIND MAY OPTIONALLY REMOVE
  833.               THE "SAVED" DISPLAY AREA FROM WINDOW MEMORY.
  834.                     A SECOND ROUTINE, DELWIND, MAY BE USED TO REMOVE
  835.               THE "SAVED" DISPLAY AREA FROM WINDOW MEMORY.  THIS
  836.               ROUTINE DOES NOT, HOWEVER, RESTORE THE "SAVED" DISPLAY
  837.               AREA TO THE SCREEN.  DO NOT CONFUSE THESE ROUTINES!!
  838.               SEE THE DESCRIPTIONS FOR ROUTINES RSTRWIND AND DELWIND
  839.               FOR DETAILS.
  840.                            LABEL$ is the text printed on the top
  841.               border or in the title box (see BORDER%) of the window.
  842.               By default the print starts on the second column.  If
  843.               the left character of LABEL$ ="@" the text will be
  844.               centered.  If LABEL$ is too long it will be truncated to
  845.               fit on the top border or in the title box.
  846.  
  847.                            TR% is the top row of the window.  If TR% =
  848.               100 the window will be centered from top to bottom.  TR%
  849.               can range from 1 to 23 or may equal 100.  Any other
  850.               value for TR% will result in a error.
  851.  
  852.  
  853.  
  854.                                        10
  855.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                            LC% is the left column position of the win-
  866.               dow. If LC% = 100 the window will be centered from left
  867.               to right.  LC% can range from 1 to 78 if the display
  868.               width is 80 or from 1 to 38 if the display width is 40.
  869.  
  870.                            WIDE% is the window's width.  WIDE% must be
  871.               greater than 2.  WIDE% + LC% -1 must not be greater than
  872.               the displays width ( 40 or 80 ).
  873.  
  874.                            NR% is the number of rows in the window and
  875.               must be greater than 2.  NR% + TR% must not be greater
  876.               than 26.  If NR% is less than 5 a window title box is
  877.               not permitted.
  878.  
  879.                            ATTR% is the window's color and may be in
  880.               the range of 0 to 255.  The foreground ( window's label
  881.               and border ) color equals ATTR% MOD 16.  The background
  882.               color equals INT( ATTR% / 16 ). If the background color
  883.               is greater than 7 the foreground flashes and the back-
  884.               ground color equals background color - 8. If the fore-
  885.               ground and background colors are the same the border and
  886.               label will not be visible. ( SEE THE COLOR ATTRIBUTE
  887.               CHART.)  ATTR% becomes the print-to color for window W%.
  888.  
  889.                            BORDER% sets the window's border and shadow
  890.               and can be up to 3 digits in length.
  891.  
  892.               DIGIT    =    #3  #2  #1
  893.               Example   =    1   1   1   ( 111 )
  894.  
  895.               Digit #1 sets the border.
  896.  
  897.                      0 = No border
  898.                      1 = Single line border
  899.                      2 = Double line border
  900.  
  901.               Digit #2 sets the shadow.
  902.  
  903.                      0 = No shadow
  904.                      1 = Right/Bottom shadow
  905.                      2 = Left/Bottom shadow
  906.                      3 = Left/Top shadow
  907.                      4 = Right/top Shadow
  908.  
  909.               Digit #3 set the title box.
  910.  
  911.                      0 = No title box
  912.                      1 = title box
  913.  
  914.               The example (111) has a 1 for each digit.  The window
  915.               will have a single lined border, a shadow on the right
  916.               and bottom and a title box
  917.  
  918.  
  919.  
  920.                                        11
  921.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.               NOTE:  IF BORDER% IS 100 OR GREATER AND THE NUMBER OF
  932.               ROWS (NR%) IS LESS THAN 5 TITLE BOXES ARE NOT PERMITTED.
  933.               SEE THE BORDER DESIGNATION CHART IN THE APPENDIX FOR
  934.               FURTHER DETAILS.
  935.  
  936.  
  937.          1.02 CHNGWIND (W%)
  938.  
  939.               Description:  Makes window, W%, the active window.
  940.               W% must represent a window area in window memory.
  941.  
  942.               Argument:   W% is the window number.  It must range from
  943.               0 to 20.  If W% does not represent a window saved by a
  944.               previous call to MAKEWIND, CHNGWIND reports an error.
  945.  
  946.               NOTE:  W% CAN NOT REPRESENT A WINDOW SAVED BY "SAVEWIND".
  947.               IT MUST REPRESENT A WINDOW SAVED BY "MAKEWIND".
  948.  
  949.  
  950.          1.03 PRINTW (TEXT$, R%, LC%)
  951.  
  952.               Description:   Prints text to the active window.  Care
  953.               must be used to assure the active window is visible
  954.               as PRINTW will print predicated on the coordinates of
  955.               the active window regardless of it's visibility.  It is
  956.               advisable, therefore, to print to a window immediately
  957.               after it is made the active window. The text's color
  958.               will be the print-to color of the active window.  If
  959.               no window is active when PRINTW is called an error will
  960.               be reported.
  961.  
  962.               Arguments:   TEXT$ is the text to be printed.
  963.  
  964.                            R% is the row in the window were the text
  965.               will print .  If R%=1 the text will print in the first
  966.               row below the border or title box. PRINTW may be used to
  967.               print a label in the bottom border of the window by
  968.               setting R% to the number or rows in the active window
  969.               minus 1 ( minus 3 if a title box was specified ).  An
  970.               invalid value for R% will result in a reported error.
  971.  
  972.                            LC% is the left column where TEXT$ starts
  973.               printing.  If LC%=100 the text will be centered left to
  974.               right.  IF LC% plus the length of TEXT$ is greater than
  975.               the windows width minus 2 an error will be reported.
  976.  
  977.  
  978.          1.04 SAVEWIND (W%, TR%, LC%, WIDE%, NR%)
  979.  
  980.               Description:   Saves a portion of the screen in window
  981.               memory.  This procedure is the same as MAKEWIND except
  982.               no window is made.  The area designated by the arguments
  983.  
  984.  
  985.  
  986.                                        12
  987.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.               is saved.  If the number assigned to W% represents a
  998.               window area previously saved by MAKEWIND or SAVEWIND an
  999.               error is reported.  An area saved via SAVEWIND can be
  1000.               "popped" to the screen at appropriate times during
  1001.               program execution by RSTRWIND ( see description ). A
  1002.               screen area saved by SAVEWIND DOES NOT BECOME THE
  1003.               ACTIVE WINDOW.  SAVEWIND differs from RESAVE in that it
  1004.               saves an area of the screen specified by it's
  1005.               arguments. RESAVE saves the area of the screen as
  1006.               designated by the coordinates of the active window.
  1007.  
  1008.  
  1009.               Arguments:  W% must range from 1 to 20.
  1010.  
  1011.                           See MAKEWIND for a description of the
  1012.               remaining arguments.
  1013.  
  1014.  
  1015.          1.05 RESAVE
  1016.  
  1017.               Description:   Saves the active window, it's interior,
  1018.               and shadow.  As window number 0 can not be saved the
  1019.               active window can not be window number 0.  If there is
  1020.               no active window or window number 0 is active when
  1021.               RESAVE is called an error will be reported.
  1022.  
  1023.               The screen area saved under the active window is removed
  1024.               from window memory and replaced with the active window
  1025.               and it's interior.   After complex screens are made in
  1026.               the active window's interior, RESAVE can be used to save
  1027.               them.   They can be restored to the screen using
  1028.               RSTRWIND.  Use RESAVE immediately after a window is made
  1029.               and it's interior is filled as  RESAVE will save the
  1030.               area of the screen determined by the active window's
  1031.               coordinates, even if it is not visible.
  1032.  
  1033.  
  1034.  
  1035.               Use RESAVE as follows;
  1036.  
  1037.               1. Make a window number 1 to 20 via a call to MAKEWIND.
  1038.                  This becomes the active window.
  1039.  
  1040.               2. Print in the window using PRINTW.  Additional windows
  1041.                  may also be printed in the window.  Use window number
  1042.                  0 to make the additional windows, as the screen area
  1043.                  under them need not be saved.
  1044.  
  1045.               3. Call CHNGWIND to make the window number used in step
  1046.                  1 the active window.  ( Only required if additional
  1047.                  windows were made inside the original window. )
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                        13
  1053.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.               4. Call RESAVE to save active window.
  1064.  
  1065.               5. Use RSTRWIND to "pop" the window and it's interior on
  1066.                  the screen any time during program execution.
  1067.  
  1068.               6. After the window is restored to the screen it may be
  1069.                  printed in again provided it is the active window.
  1070.                  This may require a call to CHNGWIND.
  1071.  
  1072.               Arguments:   None.
  1073.  
  1074.  
  1075.          1.06 RSTRWIND (W%, DELFLAG%)
  1076.  
  1077.               Description:   Restores a window area previously saved
  1078.               by MAKEWIND, SAVEWIND or RESAVE.  The window area (W%)
  1079.               must exist in window memory or RSTRWIND does nothing.
  1080.  
  1081.               Arguments:     W% is the number ( 1 to 20 ) assigned to
  1082.               the saved window area to be restored to the screen.  The
  1083.               window area is returned to it's original coordinates.
  1084.  
  1085.                              DELFLAG% is set to zero  to keep the
  1086.               windowed area in window memory.  If the DELFLAG% is not
  1087.               zero the saved window area (W%) is deleted from window
  1088.               memory. If W% was the active window an active window
  1089.               will no longer exist.
  1090.  
  1091.  
  1092.          1.07 DELWIND (W%)
  1093.  
  1094.               Description:   Deletes a saved window area (W%) from
  1095.               window memory, if it exists in window memory.  If the
  1096.               window is the active window an active window will no
  1097.               longer exist.
  1098.  
  1099.               NOTE: DELWIND DOES NOT RESTORE THE "SAVED" WINDOW AREA
  1100.               TO THE DISPLAY.  IT ONLY REMOVES THE "SAVED" WINDOW AREA
  1101.               FROM WINDOW MEMORY.  ROUTINE RSTRWIND MUST BE USED TO
  1102.               RESTORE THE "SAVED" WINDOW AREA TO THE DISPLAY.
  1103.  
  1104.               Argument:      W% is the window area number.
  1105.  
  1106.  
  1107.          1.08 CLRWIND
  1108.  
  1109.               Description:   Clears the interior of the active window.
  1110.               Care must be taken to assure that active window is
  1111.               visible as CLRWIND clears the area of the screen
  1112.               designated as the interior of the active window regard-
  1113.               less of the window's visibility.  The window will be
  1114.               cleared with it's print-to color.  If no window is
  1115.  
  1116.  
  1117.  
  1118.                                        14
  1119.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.               active when CLRWIND is called, an error is reported.
  1130.  
  1131.               Arguments:     None
  1132.  
  1133.  
  1134.          1.09 NEWCOLOR ( ATTR% )
  1135.  
  1136.               Description:   Changes the print-to color of the active
  1137.               window.  Text printed in the window by PRINTW or lines
  1138.               printed in the window by LINEW will assume the new color
  1139.               specified by this routine.  If the active window is
  1140.               cleared via a call to CLRWIND, it's interior will be
  1141.               cleared with the color specified by NEWCOLOR.  The color
  1142.               designation will be retained and used by subsequent
  1143.               calls to PRINTW or LINEW for the window which was active
  1144.               when NEWCOLOR was called.  If no window is active when
  1145.               NEWCOLOR is called, an error is reported.
  1146.  
  1147.               Argument:      ATTR% is the new color attribute.  SEE
  1148.               THE COLOR ATTRIBUTE CHART.
  1149.  
  1150.  
  1151.          1.10 LINEW ( ROW%, TYP% )
  1152.  
  1153.               Description:   Prints, or erases a line in the active
  1154.               window.  If an active window does not exist an error is
  1155.               reported. The line will assume the print-to color of the
  1156.               active window.  As the border characters are changed
  1157.               when a line is printed, the color of the border
  1158.               characters may change also.  This will occur if the
  1159.               print-to color is not the same as the color of the
  1160.               border characters in the active window.
  1161.  
  1162.               Arguments:     ROW% is the row, of the interior, of the
  1163.               active window where a line will print.  If ROW% < 1 or
  1164.               ROW% greater then the number of rows in the interior of
  1165.               the active window an error will be reported.
  1166.  
  1167.  
  1168.                              TYP% is the type of line which will print
  1169.               and may be as follows;
  1170.  
  1171.                       TYP%               Line type
  1172.                         1                Single line
  1173.                         2                Double line
  1174.                         0                Erases a line and returns
  1175.                                          normal border characters.
  1176.                         Other values     Defaults to single line.
  1177.  
  1178.  
  1179.               NOTE: IF TYP% = 0 ANY TEXT ON THE LINE IN THE WINDOW,
  1180.               POSITIONED IN ROW, ROW% WILL BE ERASED.
  1181.  
  1182.  
  1183.  
  1184.                                        15
  1185.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.          1.11 WAVAIL% ( WINDNUM% )
  1196.  
  1197.               Description: WAVAIL% is a function.  It determines if a
  1198.               window is available.  A window is available if it has
  1199.               never been used or if it has been used and subsequently
  1200.               deleted by routines RSTRWIND or DELWIND.  AS WAVAIL% IS A
  1201.               FUNCTION IT IS IMPERATIVE IT IS DECLARED IN ANY MODULE
  1202.               USING IT.  WAVAIL% equals 1 if a window is available.
  1203.               WAVAIL% equals 0 if a window is not available.
  1204.  
  1205.               Argument:    WINDNUM% is the window number.  It may range
  1206.               from 1 to 25.  Windows 1 to 20 are used in the window
  1207.               management system.  Window 22 is used for the get answer
  1208.               window in routine GETANS.  The following applies to
  1209.               windows 21, 23, 24, AND 25.
  1210.  
  1211.               WINDOW#  WAVAIL%   MEANING
  1212.                        =
  1213.               21       0         There is an active input window. It
  1214.                                  may be deleted by routine RSTRINPT. A
  1215.                                  call to INPTWIND re-enters the active
  1216.                                  input window.
  1217.               21       1         There is no active input window.
  1218.                                  Calling INPTWIND will make a new active
  1219.                                  input window.
  1220.  
  1221.               23       0         There is an active pulldown window. It
  1222.                                  may be deleted by routine RSTRPULL.  A
  1223.                                  call to PULLDOWN re-enters the active
  1224.                                  pulldown window.
  1225.               23       1         There is no active input window.
  1226.                                  Calling PULLDOWN will place the user at
  1227.                                  the first selection of the pulldown
  1228.                                  menubar.
  1229.  
  1230.  
  1231.  
  1232.               24       0         There is an active pulldown menubar. It
  1233.                                  may be deleted by routine RSTRPULL.  A
  1234.                                  call to pulldown will not save the
  1235.                                  display area occupied by the menubar.
  1236.               24       1         There is no active pulldown menubar.
  1237.                                  Calling PULLDOWN will make an active
  1238.                                  menubar and save the display area
  1239.                                  occupied by same.
  1240.  
  1241.               25       0         There is an active info-line.  It may
  1242.                                  be deleted by routine RSTRINFO. Calls
  1243.                                  to PRINTINFO will print in the info-
  1244.                                  line.
  1245.               25       1         There is no active info-line.  Calling
  1246.                                  INFOLINE will make an active info-line.
  1247.  
  1248.  
  1249.  
  1250.                                        16
  1251.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.          1.12 WINDSTATUS
  1262.  
  1263.               Description:   This is a programming tool.  Calling
  1264.               WINDSTATUS reports window 0 to 20's. number, top row,
  1265.               left column, width, number of rows, and attribute (color).
  1266.               The attribute refers to the original attribute specified
  1267.               by the call to MAKEWIND for each window.  If the
  1268.               attribute is "SAVED" the window area was saved by a call
  1269.               to SAVEWIND, not MAKEWIND.  WINDSTATUS also reports the
  1270.               active window and total window memory used to save
  1271.               window areas.   Window number zero does not use window
  1272.               memory as the area under it is not saved.  To use
  1273.               WINDSTATUS place a call to WINDSTATUS in the program at
  1274.               the location where it is desirable to view each windows
  1275.               parameters.  The program will terminate and must be
  1276.               restarted.  First remove the call to WINDSTATUS.
  1277.  
  1278.               Arguments:   None.
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.                                        17
  1317.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                         ***** PULLDOWN WINDOWS *****
  1328.  
  1329.          These procedures generate a maximum of 10 pulldown windows
  1330.          with a maximum of 22 selections ( lines ) in each window.
  1331.          The area covered by the pulldown windows is saved and
  1332.          restored as the window moves from one menubar item to the next.
  1333.          Unlike the other windowing procedures pulldown windows will
  1334.          only work in the 80 column display width mode.  To select a
  1335.          menubar item the ARROW keys can be used or the first letter
  1336.          of the menubar item may be pressed.  To select an item from
  1337.          any of the pulldown windows the ARROW keys, or "KEY CHAR-
  1338.          ACTER" for the item may be pressed.  If the ARROW keys are
  1339.          used the ENTER or RETURN key must be pressed to finalize the
  1340.          selection.  If a letter is pressed, and it is found, the
  1341.          procedure is automatically exited without the need to press
  1342.          the ENTER or RETURN keys.  The ESC and FUNCTION keys may
  1343.          optionally exit.
  1344.  
  1345.  
  1346.          2.00 SETPULL ( TR%, LC% , WD%, PWIND$() )
  1347.  
  1348.               Description: Must be called to set up the routine
  1349.               PULLDOWN.  Must be called prior to calling routines
  1350.               PULLDOWN or CHNGPULL.
  1351.  
  1352.               Arguments:   TR% is the top row position of the menubar.
  1353.               It must range from 1 to 21.  If the top row position of
  1354.               the menubar is set too low not allowing a pulldown window
  1355.               to fit on the display an error will be reported ( WINDOW
  1356.               WON'T FIT or SHADOW WON'T FIT ) when the pulldown window
  1357.               is accessed.
  1358.  
  1359.                            LC% is the left column position of the
  1360.               menubar.  It must range from 1 to 73.  If the left column
  1361.               position of the menubar is set too high not allowing a
  1362.               pulldown window to fit on the display an error will be
  1363.               reported ( WINDOW WON'T FIT or SHADOW WON'T FIT ) when
  1364.               the pulldown window is accessed.
  1365.  
  1366.                            WD% is the width of the menubar.  WD% is
  1367.               self adjusting if it is set outside of the permissible
  1368.               range.  The maximum width of the menubar is 81 - LC%.
  1369.               The minimum width of the menubar equals the width of the
  1370.               individuals items in the menubar plus two spaces between
  1371.               each item plus two preceding spaces and one trailing
  1372.               space.  If WD% is set too low it self adjusts to the
  1373.               minimum width.  If it is set too high it self adjusts to
  1374.               the maximum width.  WD% only changes the length, by
  1375.               adding trailing spaces to the menubar, if it is greater
  1376.               then the minimum width and less then or equal to the
  1377.               maximum width of the menubar.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                                        18
  1383.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                             PWIND$() is an array containing strings
  1394.               representing menubar selections, the data for the info-
  1395.               line for the menubar selections, and the individual
  1396.               pulldown window selections.  PWIND$() must be in the
  1397.               correct format.  The last selection in each pulldown
  1398.               window must be followed by a "***" in PWIND$().
  1399.               "ENDPULL" in PWIND$() marks the end of all pulldown
  1400.               windows.  PWIND$(1) must be the first string in the
  1401.               array, NOT PWIND$(0).  The following represents an
  1402.               example of the required format for PWIND$() for a
  1403.               pulldown window ( the first pulldown window ).
  1404.  
  1405.               EXAMPLE:
  1406.  
  1407.               PWIND$(1) = "File"               ' Menubar selection for
  1408.               ( SEE BELOW )                    ' pulldown window one.
  1409.  
  1410.               PWIND$(2) = "File operations"    ' This will print in
  1411.               NOTE: MUST = "" IF INFO-LINE     ' the info-line when
  1412.               IS NOT USED.                     ' menubar selection 1
  1413.                                                ' is selected.
  1414.  
  1415.               PWIND$(3) = "Save"               ' Selections for the
  1416.               PWIND$(4) = "Get"                ' pulldown window.
  1417.               PWIND$(5) = "Delete"
  1418.  
  1419.               PWIND$(6) = "***"                ' End of pulldown
  1420.                                                ' window.
  1421.  
  1422.               PWIND(7) = ........              ' Start over for next
  1423.                                                ' pulldown window.
  1424.  
  1425.               PWIND(?? - 1) = "***"            ' End of last pulldown
  1426.                                                ' window.
  1427.  
  1428.               PWIND(??) = "ENDPULL"            ' End of all pulldown
  1429.                                                  data.
  1430.  
  1431.               In the above example PWIND$(1) holds the menubar selection
  1432.               for the first pulldown window.  The menubar defaults to
  1433.               two spaces between selections. If PWIND$(1) = "File  " two
  1434.               additions spaces will be inserted between "File" and the
  1435.               next menubar selection.  Only trailing spaces are
  1436.               considered.  Leading spaces are removed.  PWIND$(2) holds
  1437.               the data for the info-line ( SEE ROUTINE INFOLINE ) for
  1438.               the first menubar selection, "File".  For every menubar
  1439.               selection in PWIND$() the following element of PWIND$()
  1440.               MUST contain info-line data.  If an info-line is not used
  1441.               set the appropriate elements of PWIND$ to equal "".
  1442.               Pulldown window selections follow the info-line data in
  1443.               PWIND$(). Each element of PWIND$() which represents a
  1444.               pulldown window selection has a "KEY CHARACTER".  The key
  1445.  
  1446.  
  1447.  
  1448.                                        19
  1449.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.               character is the character which is searched for when a
  1460.               key is pressed while in the PULLDOWN window environment.
  1461.               The key character defaults to the first character in each
  1462.               item.  To designate the key character as a different
  1463.               character follow the character with a "@".  THIS IS ONLY
  1464.               APPLICABLE TO THE PULLDOWN WINDOW SELECTIONS.  THE
  1465.               PULLDOWN MENUBAR SELECTIONS ALWAYS DEFAULT TO THE FIRST
  1466.               CHARACTER.  IF A "@" IS PLACED IN A MENUBAR STRING IT WILL
  1467.               PRINT AS PART OF THE MENUBAR.
  1468.  
  1469.               EXAMPLES:
  1470.               PWIND$(3) = "Get File"        ( Key character = "G")
  1471.               PWIND$(4) = "Save F@ile"      ( Key character = "F")
  1472.  
  1473.               The "@" will not be displayed when the string is printed
  1474.               in the pulldown window.  The description for KEYATTR%
  1475.               for the routine PULLDOWN describes how to make the key
  1476.               character a different color, or high intensity, enabling
  1477.               users to distinguish it as the key character.
  1478.  
  1479.               NOTE: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  1480.               STRING AS IT WILL PRINT IN THE PULLDOWN WINDOW.  AS
  1481.               STATED THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF
  1482.               THE "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  1483.               NEED TO PLACE THE "@" IN POSITION TWO.
  1484.  
  1485.               If an element of PWIND$() = "-" and it is not the first
  1486.               or last item in a pulldown window it will segment the
  1487.               pulldown window by placing a line across the width of it.
  1488.               If the "-" is the first or last item in the pulldown
  1489.               window it will print as a "-".
  1490.  
  1491.               EXAMPLE:  PWIND$(4) = "-"   Providing PWIND$(4) is not
  1492.                         last item in the pulldown window PWIND$(4) will
  1493.                         print as a line across the window.
  1494.  
  1495.               --------------------------------------------------------
  1496.               EXAMPLE: SETPULL
  1497.  
  1498.               N%=30                           ' USE THIS METHOD SO
  1499.               DIM PWIND$(N%)                  ' PWIND$() IS DYNAMIC.
  1500.                                               ' DON'T USE DIM PWIND$(30).
  1501.               TEMP%=0
  1502.               WHILE PWIND$(TEMP%) <> "ENDPULL"
  1503.                  TEMP% = TEMP% + 1            ' TEMP% MUST START WITH 1.
  1504.                  READ PWIND$(TEMP%)           ' READ PULLDOWN WINDOW DATA.
  1505.               WEND
  1506.               TR%=1: LC%=1: WD%=80            ' MENUBAR'S LOCATION/WIDTH.
  1507.  
  1508.               CALL SETPULL ( TR%, LC%, WD%, PWIND$() )  'SET PULLDOWN
  1509.               ERASE PWIND$                    ' COMPLETELY ERASES PWIND$()
  1510.                                               ' IF IT IS DYNAMIC.
  1511.  
  1512.  
  1513.  
  1514.                                        20
  1515.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.               DATA THIS                  :' MENUBAR SELECTION FOR PULL-
  1526.                                          :'  DOWN WINDOW #1.
  1527.               DATA Sample window 1       :' INFO-LINE FOR MENUBAR
  1528.                                          :' SELECTION FOR WINDOW 1.
  1529.               DATA HELLO, JOE,***        :' WINDOW #1 SELECTIONS
  1530.  
  1531.               DATA IS                    :' MENUBAR SELECTION - WINDOW 2.
  1532.               DATA Sample window 2       :' INFO-LINE FOR MENUBAR SELECTION.
  1533.               DATA HOW, ARE, -, YOU,***  :' WINDOW #2 SELECTIONS.
  1534.                                          :' LINE PRINTED IN ROW 3
  1535.  
  1536.               DATA A                     :' MENUBAR SELECTION - WINDOW 3.
  1537.               DATA Sample window 3       :' INFO-LINE FOR MENUBAR SELECTION.
  1538.               DATA I,AM@,FINE,***        :' WINDOW 3 SELECTIONS.  "AM" HAS
  1539.                                          :' A KEY CHARACTER OF "M".
  1540.  
  1541.               DATA SAMPLE                :' MENUBAR SELECTION - WINDOW 4.
  1542.               DATA Sample window 4       :' INFO-LINE FOR MENUBAR SELECTION.
  1543.               DATA BYE,***               :' WINDOW 4 SELECTION - ONE ITEM.
  1544.  
  1545.  
  1546.               DATA ENDPULL               :' END OF DATA ( CASE SENSITIVE )
  1547.               --------------------------------------------------------
  1548.  
  1549.               Array PWIND$() is dimensioned to hold the pulldown menubar,
  1550.               info-line, and window data.  This is only a temporary array
  1551.               to hold the data and is erased after SETPULL is called.
  1552.               The data is then read.  The "***" signals the end of each
  1553.               pulldown window and MUST be entered exactly as shown. The
  1554.               "ENDPULL" signals the end for all pulldown windows and MUST
  1555.               be the last data item read.  If the format is not exactly
  1556.               as shown an error will be reported or the windows will not
  1557.               be as expected.  In the example shown the first menubar
  1558.               item is "THIS".  It's associated pulldown window contains
  1559.               the two items "HELLO" and "JOE".  When "THIS" is selected
  1560.               the info-line, if it is on, will display "Sample window 1".
  1561.               The last menubar item is "SAMPLE" and it's pulldown window
  1562.               contains one item "BYE".  When "SAMPLE" is selected the
  1563.               info-line will display "Sample window 3".  The menubar is
  1564.               located on line 1, column 1 ( TR%=1 and LC% = 1 ). It
  1565.               occupies the entire row as WD% = 80.
  1566.  
  1567.               NOTE: THE DATA MUST BE IN THE FORMAT SHOWN.  THE CHAR-
  1568.               ACTERS "***" MARK THE END OF EACH INDIVIDUAL WINDOW AND
  1569.               THE WORD "ENDPULL" MARKS THE END OF ALL PULLDOWN WINDOWS.
  1570.  
  1571.  
  1572.  
  1573.          2.01 PULLDOWN (INFO$(),BAR%,WIND%,EX$,RKEY%,ATTR%,KEYATTR%,BRDR%)
  1574.  
  1575.               NOTE 1: ROUTINE "SETPULL" MUST BE CALLED ONCE PRIOR TO
  1576.               CALLING THIS ROUTINE.
  1577.  
  1578.  
  1579.  
  1580.                                        21
  1581.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.               NOTE 2: ROUTINE "RSTRPULL" MUST BE CALLED AFTER THIS
  1592.               ROUTINE IS EXITED TO DEACTIVATE THE ACTIVE PULLDOWN WINDOW
  1593.               AND RESTORE THE DISPLAY AREAS UNDER THE ACTIVE PULLDOWN
  1594.               WINDOW AND MENUBAR.  IF "RSTRPULL" IS NOT CALLED THE
  1595.               ACTIVE PULLDOWN WINDOW AND MENUBAR REMAIN ACTIVE.
  1596.               ( *** SEE RSTRPULL *** )
  1597.  
  1598.               Description: Places the user in the pulldown window
  1599.               environment.  On entering PULLDOWN, the following occurs.
  1600.  
  1601.               1. IF AN ACTIVE PULLDOWN WINDOW DOES NOT EXIST the scroll
  1602.                  bar will be positioned over first selection in the
  1603.                  pulldown menubar.
  1604.  
  1605.               2. IF AN ACTIVE PULLDOWN WINDOW EXISTS the scroll bar will
  1606.                  be positioned over the active pulldown selection in the
  1607.                  active pulldown window ( SEE RSTRPULL ).  This may be
  1608.                  appropriate if a selection from a pulldown window is
  1609.                  used to present the user with selections from another
  1610.                  scroll window external to PULLDOWN.  If the user
  1611.                  presses ESC to exit the external scroll window PULLDOWN
  1612.                  may be re-entered exactly where it was exited.  IN THIS
  1613.                  CASE THE ACTIVE PULLDOWN WINDOW MUST BE INTACT.  IT
  1614.                  WILL NOT BE COMPLETELY RE-PRINTED. If the user makes a
  1615.                  selection from the external scroll window, the routine
  1616.                  RSTRPULL may be used to restore the area under the
  1617.                  pulldown window and deactivate the active pulldown
  1618.                  window. The next call to PULLDOWN displays the pulldown
  1619.                  menubar with the scroll bar positioned over the first
  1620.                  item.
  1621.  
  1622.               IF AN ACTIVE PULLDOWN WINDOW UNKNOWINGLY EXISTS ON ENTRY
  1623.               TO PULLDOWN THE ACTIVE PULLDOWN WINDOW, IF NOT DISPLAYED,
  1624.               WILL HAVE IT'S INTERIOR PARTIALLY REPRINTED.  THE WINDOW
  1625.               WILL NOT BE RE-PRINTED.
  1626.  
  1627.               Arguments:   INFO$() is a string array holding the data
  1628.               for the info-line ( SEE ROUTINE INFOLINE ) for each
  1629.               pulldown windows's selections.  Do not confuse this with
  1630.               the info-line data which is associated with the menubar
  1631.               selections as defined in routine SETPULL.  The info-line
  1632.               provides instructions or descriptions for the selections
  1633.               in the pulldown windows.  If pulldown window one holds
  1634.               five selections, INFO$(1) holds the data for the first
  1635.               selection in the window.  INFO$(2) is the data for the
  1636.               second selection.  Corresponding elements of INFO$() and
  1637.               the pulldown window's selections are related.  A
  1638.               SEGMENTING LINE IN A PULLDOWN WINDOW MUST BE REPRESENTED
  1639.               BY A "" IN INFO$().  If pulldown window one contains
  1640.               five selections and pulldown window two contains ten
  1641.               selections, INFO$(6) will hold the data for the info-
  1642.               line for the first selection in the pulldown window two
  1643.  
  1644.  
  1645.  
  1646.                                        22
  1647.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.               while INFO$(15) will hold the data for the info-line for
  1658.               the last selection.  The elements of INFO$() will only
  1659.               be displayed in the info-line if it is "turned on" via
  1660.               routine INFOLINE.  IF AN INFO-LINE IS NOT USED INFO$()
  1661.               MUST STILL BE A PREVIOUSLY DIMENSION ARRAY.  DIMENSION
  1662.               INFO$() TO ZERO BEFORE CALLING PULLDOWN.
  1663.  
  1664.               EXAMPLE: DIM INFO$(0)       'IF INFO-LINE IS NOT USED
  1665.  
  1666.               Using the example for the pulldown windows defined in
  1667.               the call to SETPULL ( SEE - EXAMPLE: SETPULL ) the
  1668.               following could apply to INFO$()
  1669.  
  1670.               EXAMPLE: DIM INFO$(10)      ' DO NOT ERASE THIS ARRAY!!!
  1671.  
  1672.                   INFO$()                 ' RELATED PULLDOWN SELECTION
  1673.                   ----------------------------------------------------
  1674.  
  1675.                   INFO$(1) = "ONE"        ' WINDOW 1 SELECTION "HELLO"
  1676.                   INFO$(2) = "TWO"        ' WINDOW 1 SELECTION "JOE"
  1677.  
  1678.                   INFO$(3) = "THREE"      ' WINDOW 2 SELECTION "HOW"
  1679.                   INFO$(4) = "FOUR"       ' WINDOW 2 SELECTION "ARE"
  1680.                   INFO$(5) = ""           ' WINDOW 2 -- LINE
  1681.                   INFO$(6) = "FIVE"       ' WINDOW 2 SELECTION "YOU"
  1682.  
  1683.                   INFO$(7) = "SIX"        ' WINDOW 3 SELECTION "I"
  1684.                   INFO$(8) = "SEVEN"      ' WINDOW 3 SELECTION "AM"
  1685.                   INFO$(9) = "EIGHT"      ' WINDOW 3 SELECTION "FINE"
  1686.  
  1687.                   INFO$(10) = "NINE"      ' WINDOW 4 SELECTION "BYE"
  1688.  
  1689.                   The numbers ONE, TWO, THREE .... will print in the
  1690.                   info-line when the corresponding pulldown window
  1691.                   selection is covered by the scroll bar.
  1692.  
  1693.                            BAR% is the sequential number (left to right)
  1694.               of selected menubar item . It is returned by the calling
  1695.               procedure, PULLDOWN.  If the second item in the menubar is
  1696.               selected, BAR% will equal two.  If ESC is pressed and
  1697.               ESC is an exit key BAR% will equal 0 on exit.  If a
  1698.               function key is pressed and it is an exit key, BAR% will
  1699.               equal the highlighted menubar selection on exit.
  1700.  
  1701.                            WIND% represents the row number of the
  1702.               selected pulldown window item.  It is returned by the
  1703.               calling procedure.  If the ESC pressed and ESC is an exit
  1704.               key, WIND% will equal 0 on exit.  If a function key is
  1705.               pressed and it is an exit key, WIND% will equal the
  1706.               highlighted pulldown window selection ( interior row
  1707.               number ) on exit.
  1708.  
  1709.  
  1710.  
  1711.  
  1712.                                        23
  1713.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.               NOTE:  A SEGMENTING LINE IN A PULLDOWN WINDOW OCCUPIES A
  1724.               ROW POSITION.
  1725.  
  1726.                            EX$ sets the keys which will, when pressed,
  1727.               exit PULLDOWN.  The ENTER ( RETURN ) key always exits.
  1728.               EX$ can be used to simulate a selection from a pulldown
  1729.               window. ( SEE DESCRIPTION FOR ARGUMENT RKEY% ).  EX$ may
  1730.               be any combination of the following.
  1731.  
  1732.                     "0"             The F10 key will exit.
  1733.                     "1" to "9"      The F1 to F9 key will exit.
  1734.                     "E"             The ESC key will exit.
  1735.  
  1736.               EXAMPLE: EX$ = "E24"  The ESC, F2, F4 and ENTER keys exit.
  1737.  
  1738.                            RKEY% returns a numeric representation for
  1739.               the key which was pressed to cause the exit from PULLDOWN.
  1740.               On exit RKEY% may equal the following.
  1741.  
  1742.                     1 to 10         The F1 to F10 key caused the exit.
  1743.                     13              The ENTER key caused the exit.
  1744.                     27              The ESC key caused the exit.
  1745.  
  1746.               Arguments EX$ and RKEY% to may be used to simulate a
  1747.               selection from a pulldown window.  To use the F1 key to
  1748.               simulate the first selection from the second pulldown
  1749.               window, argument EX$ must contain a "1" on entering
  1750.               PULLDOWN.  Check to see if the F1 key caused the exit
  1751.               ( RKEY% = 1 ) from PULLDOWN.   If it did set BAR% to 2
  1752.               simulating the second pulldown window.  Set WIND% to 1 to
  1753.               simulate the first selection from the second pulldown
  1754.               window.
  1755.  
  1756.               NOTE: IF ROUTINE CHNGPULL IS USED TO DISABLE A PULLDOWN
  1757.               WINDOW'S SELECTION AND THE SELECTION MAY ALSO BE SIMULATED
  1758.               BY AN EXIT KEY, ARGUMENT EX$ MUST BE ADJUSTED ACCORDINGLY
  1759.               TO PREVENT THE EXIT KEY FROM SIMULATING THE DISABLED
  1760.               SELECTION.
  1761.  
  1762.                            ATTR% is the color.  It follows the same
  1763.               rules as described in MAKEWIND except a flashing
  1764.               foreground is not permitted. Any value over 127 is
  1765.               changed to ATTR% MOD 128.
  1766.  
  1767.                            KEYATTR% is the color of the key character
  1768.               for selections in the pulldown windows.  If KEYATTR% = 0
  1769.               the key character will be the same color as the other
  1770.               characters in each window selections.  This would be
  1771.               appropriate if the first character in each selection is
  1772.               ALWAYS the key character. Setting KEYATTR% to a different
  1773.               color, or high intensity, allows users to distinguish the
  1774.               character as the key character for each item in the list.
  1775.  
  1776.  
  1777.  
  1778.                                        24
  1779.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.               Any value for KEYATTR% over 127 is changed to KEYATTR%
  1790.               MOD 128.
  1791.  
  1792.                            BRDR% is the pulldown window's border
  1793.               designation.  BRDR% can equal 0, 1, 2, 10, 11 or 12 for
  1794.               pulldown windows.  Any other value for BRDR% will
  1795.               result in an error.  SEE THE BORDER DESIGNATION CHART.
  1796.  
  1797.  
  1798.          2.02 RSTRPULL ( RSTRMENUBAR% )
  1799.  
  1800.               Description: Restores the display area under and
  1801.               deactivates the active pulldown window.  The active
  1802.               pulldown window is the displayed pulldown window when
  1803.               routine PULLDOWN is exited.  Normally a call to RSTRPULL
  1804.               will be made when PULLDOWN is exited.  There may be times,
  1805.               however, when it is desirable to leave the active pulldown
  1806.               window and menubar displayed.  If this is the case
  1807.               RSTRPULL should not be called after PULLDOWN is exited.
  1808.  
  1809.               If RSTRPULL is NOT called after PULLDOWN is exited the
  1810.               following will occur:
  1811.  
  1812.               1. The pulldown window which was active when PULLDOWN
  1813.                  was exited will remain displayed.
  1814.  
  1815.               2. The pulldown window which was active when PULLDOWN was
  1816.                  exited remains the active pulldown window. The next
  1817.                  call to PULLDOWN will return to the active pulldown
  1818.                  window with the previous ( active ) selection from the
  1819.                  pulldown window covered by the scroll bar.
  1820.  
  1821.                  NOTE: WHEN PULLDOWN IS RE-ENTERED UNDER THESE THE
  1822.                  ROUTINE, PULLDOWN, EXPECTS THE ACTIVE PULLDOWN WINDOW
  1823.                  AND MENUBAR TO BE INTACT.  IF IT IS NOT, THE PULLDOWN
  1824.                  WINDOW WILL NOT BE DISPLAYED AS EXPECTED.  IT IS
  1825.                  IMPORTANT THAT NO PORTION OF ACTIVE PULLDOWN WINDOW OR
  1826.                  MENUBAR IS "PRINTED OVER" PRIOR TO RE-ENTERING
  1827.                  PULLDOWN.
  1828.  
  1829.               Argument:    RSTRMENUBAR% determines if the area under the
  1830.               menubar is restored to the display when RSTRPULL is
  1831.               called.  If RSTRMENUBAR% = 0 the menubar will remain
  1832.               displayed after RSTRPULL is called and the menubar will
  1833.               remain active.  Subsequent calls to PULLDOWN DO NOT save
  1834.               the area under the menubar.  PULLDOWN expects the menubar
  1835.               to be intact.  If RSTRMENUBAR% = 1 the area under the
  1836.               menubar is restored to the display and the menubar is
  1837.               deactivated.  Subsequent calls to PULLDOWN save the area
  1838.               under, and display a new  menubar.  By virtue of a call to
  1839.               RSTRPULL the area under the active pulldown window is
  1840.               restored and the active pulldown window is deactivated.
  1841.  
  1842.  
  1843.  
  1844.                                        25
  1845.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.               The status of argument RSTRMENUMAR% has no affect on the
  1856.               status of the active pulldown window.  It only restores
  1857.               and deactivates the menubar or allows same to remain
  1858.               active.  In either case the next call to PULLDOWN will
  1859.               position the scroll bar over the first selection of the
  1860.               menubar after a call to RSTRPULL.
  1861.  
  1862.               NOTE: THE SAVED DISPLAY AREA FOR THE ACTIVE PULLDOWN
  1863.               WINDOW RESIDES IN WINDOW NUMBER 23.  FUNCTION WAVAIL% CAN
  1864.               DETERMINE IF A PULLDOWN WINDOW IS ACTIVE.
  1865.  
  1866.               EXAMPLE: IF WVAIL%(23) = 0 ' A pulldown window is active.
  1867.                        IF WVAIL%(23) = 1 ' A pulldown window is not
  1868.                                          '  active.
  1869.  
  1870.               THE SAVED DISPLAY AREA FOR THEN MENUBAR RESIDES IN WINDOW
  1871.               NUMBER 24.  FUNCTION WVAIL% CAN DETERMINE IF THE MENUBAR
  1872.               IS ACTIVE.
  1873.  
  1874.               EXAMPLE: IF WAVAIL%(24) = 0 ' The menubar is active.
  1875.                        IF WAVAIL%(24) = 1 ' the menubar is not active.
  1876.  
  1877.          2.03 CHNGPULL ( BARITEM%, WINDITEM%, ATTR% )
  1878.  
  1879.               NOTE: ROUTINE SETPULL MUST BE CALLED ONCE IN EVERY PROGRAM
  1880.               BEFORE ANY CALLS TO THIS ROUTINE.
  1881.  
  1882.               Description:  disables or enables the ability to select
  1883.               the item, and changes the items color, in a pulldown window.
  1884.  
  1885.               Arguments:   BARITEM% is the sequential number ( left
  1886.               to right ) of the menubar selection associated with the
  1887.               item's pulldown window.
  1888.  
  1889.                            WINDITEM% is the row position of the item
  1890.               in the pulldown window's interior.
  1891.  
  1892.               NOTE:  A LINE IN A PULLDOWN WINDOW OCCUPIES A ROW
  1893.               POSITION.
  1894.  
  1895.                            ATTR% serves two purposes.
  1896.  
  1897.               If ATTR% > 0 it changes the color of the item
  1898.               specified by BARITEM% and WINDITEM% to ATTR% ( SEE THE
  1899.               COLOR ATTRIBUTE CHART ). The key character in the item
  1900.               also assumes the color specified by ATTR%.  The ability
  1901.               to select the item from the pulldown window is disabled.
  1902.               Any value for ATTR% over 127 is changed to ATTR% MOD 128.
  1903.               If ATTR% = 0 the color of the item, and it's key char-
  1904.               acter is returned to it's original status as defined in
  1905.               the original call to PULLDOWN.  The ability to select
  1906.               the item is enabled.
  1907.  
  1908.  
  1909.  
  1910.                                        26
  1911.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                          ***** SCROLL WINDOWS *****
  1922.  
  1923.          SCRLWIND places a scrollable list in the active window.  A
  1924.          highlight ( scroll ) bar is placed over a specified item in
  1925.          the list and can be moved by the user via the UP and DOWN
  1926.          ARROW keys or MOUSE.  Pressing the ENTER key returns the
  1927.          sequential item number covered by the scroll bar.  The HOME,
  1928.          END, PG UP, and PG DN keys move the scroll bar as indicated.
  1929.          When a key is pressed SCRLWIND checks to see if the key matches
  1930.          the KEY CHARACTER of any element of the list.  If a match is
  1931.          found the scroll bar moves to that position in the list.
  1932.  
  1933.          3.00 SETSCRL ( ARROW%, NOHI%, TAGCOLOR% )
  1934.  
  1935.               Description: Set up routine for routine SCRLWIND.
  1936.               Determines if the position designator ( arrow ) on the
  1937.               right border of the scroll window is displayed, how high
  1938.               intensity characters are displayed, and the color of the
  1939.               character representing marked ( tagged ) selections in a
  1940.               "mark" scroll window.
  1941.  
  1942.               NOTE1: IF SETSCRL IS NOT CALLED PRIOR TO CALLING SCRLWIND
  1943.               THE DEFAULTS ARE;
  1944.  
  1945.               1. THE POSITION DESIGNATOR ( ARROW ) IS NOT DISPLAYED.
  1946.  
  1947.               2. HIGH INTENSITY CHARACTERS ARE DISPLAYED NORMALLY.
  1948.  
  1949.               3. THE COLOR OF THE CHARACTER USE TO MARK ( TAG )
  1950.                  SELECTIONS IS THE SAME AS THE TEXT IN THE SCROLL
  1951.                  WINDOW.
  1952.  
  1953.               NOTE2:  SETSCRL NEED ONLY BE CALLED ONCE IN ANY PROGRAM.
  1954.               ALL CALLS TO SCRLWIND AFTER CALLING SETSCRL RETAIN THE
  1955.               ATTRIBUTES DESIGNATED BY THE ONE CALL TO SETSCRL. TO
  1956.               CHANGE THE ATTRIBUTES SETSCRL MUST BE CALLED AGAIN.
  1957.  
  1958.               Arguments:   ARROW% determines if the position designator
  1959.               ( arrow ) on the right border of the scroll window is
  1960.               displayed.  If ARROW% equals 1 the arrow is displayed. If
  1961.               ARROW% equals 0 the arrow is not displayed.
  1962.  
  1963.                            NOHI% determines how pulldown and scroll
  1964.               window routines display high intensity "key" characters.
  1965.               If NOHI% equals 0 and the key character's color is set to
  1966.               a high intensity it is displayed as high intensity.  If
  1967.               NOHI% = 1 high intensity "key" characters are displayed in
  1968.               reverse video.  This is appropriate for LCD displays which
  1969.               can not display high intensity characters.   NOHI% affects
  1970.               "key" characters only.
  1971.               ( SEE PULLDOWN AND SCRLWIND DESCRIPTIONS. )
  1972.  
  1973.  
  1974.  
  1975.  
  1976.                                        27
  1977.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.                            TAGCOLOR% sets the color of the mark
  1988.               designator for mark scroll windows.  It affects the
  1989.               foreground color only.  TAGATTR% is therefore adjusted to
  1990.               TAGATTR% and 15.  If TAGATTR% is set to zero the color of
  1991.               the mark designator defaults to the same color as the text
  1992.               in the scroll window.
  1993.  
  1994.          3.01 SCRLWIND (LIST$(), INFO$(), TL$, ENTRIES%, KIND$, RTRN%,
  1995.                         LI%, FC%  RKEY%, KEYATTR%)
  1996.  
  1997.               NOTE1: THE ABOVE MUST BE ON ONE LINE IN THE QB/QBX
  1998.               ENVIRONMENT.
  1999.  
  2000.               NOTE2: FOR ADVANCED FEATURES SEE ROUTINE B4SCRL.  THESE
  2001.               FEATURES INCLUDE THE ABILITY TO EXIT THIS ROUTINE USING
  2002.               DEFINABLE "EXIT KEYS" AND THE ABILITY TO SET MARKED ( TAGGED )
  2003.               SELECTIONS ON ENTRY.
  2004.  
  2005.               NOTE3: SEVERAL GLOBAL DEFAULTS FOR THIS ROUTINE MAY BE
  2006.               CHANGED BY ROUTINE SETSCRL.
  2007.  
  2008.               Description: Places a list ( LIST$() ) in the active
  2009.               window.  The list is ENTRIES% long.  There are two classes
  2010.               of scroll windows.
  2011.  
  2012.               1. Non-virtual scroll windows.  If argument KEYATTR% does
  2013.                  not equal zero the scroll window is a non-virtual
  2014.                  scroll window.  On entry, SCRLWIND, verifies each
  2015.                  element of LIST$() will fit in the scroll window with a
  2016.                  leading and trailing space added to the string.  If any
  2017.                  item will not fit an error is reported.  Non-virtual
  2018.                  scroll windows may be ( SEE ARGUMENT KIND$ ) regular,
  2019.                  auto-exit, multiple mark, single mark, or list scroll
  2020.                  windows.
  2021.  
  2022.               2. Virtual scroll windows.  If argument KEYATTR% equals
  2023.                  zero, the scroll window is a virtual scroll window.
  2024.                  Virtual scroll windows allow horizontal and vertical
  2025.                  scrolling.  The LEFT ARROW and RIGHT ARROW key become
  2026.                  active.  A differently colored "key character" is not
  2027.                  permitted in a virtual scroll window as the character
  2028.                  would not be visible when it is scrolled out if the
  2029.                  window.  No checks are made to verify the string length
  2030.                  in a virtual scroll window.  Virtual scroll windows may
  2031.                  be ( SEE ARGUMENT KIND$ ) regular, auto-exit, multiple
  2032.                  mark, single mark, or list scroll windows.  If argument
  2033.                  KEYATTR% equals zero and all elements of the list will
  2034.                  fit in the window's width the scroll window assumes the
  2035.                  properties of a non-virtual scroll window.  The RIGHT
  2036.                  ARROW and LEFT ARROW keys are not active.
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.                                        28
  2043.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.               NOTE: ARGUMENT KEYATTR% DETERMINES IF A SCROLL WINDOW IS
  2054.               A VIRTUAL OR NON-VIRTUAL SCROLL WINDOW. SEE THE
  2055.               DESCRIPTION FOR KEYATTR% FOR MORE INFORMATION.
  2056.  
  2057.  
  2058.               Arguments:   LIST$() is the array holding the strings to
  2059.               be placed in the scroll window.  Each element of the
  2060.               array is a line in the scroll window.  If the length of
  2061.               any element is greater then the width of the window - 4
  2062.               and the scroll window is a non-virtual scroll window
  2063.               ( KEYATTR% <> 0 ) an error is reported. LIST$(1) must be
  2064.               the first string in the array, NOT LIST$(0).
  2065.  
  2066.               Each selectable item in LIST$() has a "KEY CHARACTER".
  2067.               The key character is the character which is searched for
  2068.               when a key is pressed while in the SCRLWIND environment.
  2069.               The key character defaults to the first character in
  2070.               each item.  To designate the key character as a
  2071.               different character follow the character with a "@" in
  2072.               the string.
  2073.  
  2074.               EXAMPLE: LIST$(1) = "Get File"  ( Key character = "G")
  2075.                        LIST$(2) = "Save F@ile"( Key character = "F")
  2076.  
  2077.               The "@" will not be displayed when the string is printed
  2078.               in the scroll window.  The description for KEYATTR% for
  2079.               this routine describes how to make the key character a
  2080.               different color, or high intensity, enabling users to
  2081.               distinguish it as the key character.
  2082.  
  2083.               NOTE1: DO NOT PLACE THE "@" IN POSITION ONE OR TWO OF THE
  2084.               STRING AS IT WILL PRINT IN THE SCROLL WINDOW.  AS STATED
  2085.               THE KEY CHARACTER WILL DEFAULT TO POSITION ONE IF THE
  2086.               "@" IS OMITTED FROM THE STRING.  THIS ELIMINATES THE
  2087.               NEED TO PLACE THE "@" IN POSITION ONE OR TWO.
  2088.  
  2089.               NOTE2: IF ROUTINE B4SCRL IS USED TO SET A SCROLL WINDOW'S
  2090.               EXIT CRITERIA, AND ROUTINE B4SCRL'S ARGUMENT, EXIT$,
  2091.               CONTAINS AN "X" THE "KEY CHARACTER" SEARCH FEATURE IS
  2092.               DISABLED.  DO NOT USE KEY CHARACTERS IF THIS IS THE CASE.
  2093.               ( SEE ROUTINE B4SCRL )
  2094.  
  2095.               If an element of LIST$() = "-" and it is not the first
  2096.               item in the list or the last item in the list and all of
  2097.               the items in LIST$() will fit in the window's interior
  2098.               the scroll window will be segmented.  A line will print
  2099.               across the window as determined by the position of the
  2100.               "-" in LIST$().  If the previous conditions are not met
  2101.               the string will print as a "-".
  2102.  
  2103.               EXAMPLE:  LIST$(2) = "-"  ( Provided LIST$(2) is not
  2104.                         the last item in the list and the number of
  2105.  
  2106.  
  2107.  
  2108.                                        29
  2109.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.                         interior rows in the window is greater than
  2120.                         two, LIST$(2) will print as a line.)
  2121.  
  2122.                            INFO$() is an array holding the individual
  2123.               strings used for the information line for each entry in
  2124.               the scroll window ( SEE ROUTINE INFO-LINE ).  As the
  2125.               scroll bar moves from entry to entry the message in the
  2126.               info-line changes based on the element of INFO$() which
  2127.               corresponds to the selected entry in the scroll window.
  2128.               If the scroll bar is over the third entry in the scroll
  2129.               window INFO$(3) will print in the info-line, provided the
  2130.               info-line is on.  A SEGMENTING LINE IN THE SCROLL WINDOW
  2131.               MUST BE REPRESENTED BY AN ELEMENT IN INFO$().  IF A
  2132.               SEGMENTING LINE OCCUPIES THE FOURTH ROW OF THE SCROLL
  2133.               WINDOW INFO$(4) MUST EQUAL "".  If the info-line is not
  2134.               going to be used or if a fixed info-line message is to be
  2135.               printed for all entries in the scroll window INFO$() must
  2136.               still be a dimensioned array prior to calling SCRLWIND.
  2137.               FOR NO INFO-LINE OR A FIXED INFO-LINE MESSAGE INFO$() MUST
  2138.               BE DIMENSIONED TO ZERO ( EX: DIM INFO$(0) ).
  2139.  
  2140.                            TL$ is a string which will print in the title
  2141.               box of a scroll window.  TL$ is ignored if the scroll
  2142.               window does not have a title box.  TL$ is useful for
  2143.               virtual scroll windows.  When a virtual scroll window
  2144.               scrolls up and down, TL$ does not move.  When a virtual
  2145.               scroll window scrolls left and right TL$ scrolls with the
  2146.               window's interior.  TL$ can, therefore, be longer than the
  2147.               window's width when used with a virtual scroll window.
  2148.               Although TL$ may be used in other ( non-virtual ) scroll
  2149.               windows, the title for the scroll window can be generated
  2150.               in the call to MAKEWIND for the scroll window.
  2151.  
  2152.                            ENTRIES% is the number of elements in the
  2153.               array ( LIST$() ) to use in the scroll window.
  2154.  
  2155.                            KIND$ specifies the type of scroll window
  2156.               and may be any of the following.
  2157.  
  2158.               KIND$        DESCRIPTION ( Detail descriptions follow )
  2159.  
  2160.               "A"          Auto-exit scroll window.
  2161.               "M"          Multiple mark ( tag ) scroll window.
  2162.               "S"          Single mark ( tag ) scroll window.
  2163.               "L"          List scroll window.  No scroll bar.
  2164.               "V", "SV"    View scroll window.
  2165.  
  2166.               Any other value for KIND$ generates a regular scroll
  2167.               window.
  2168.  
  2169.               AUTO-EXIT SCROLL WINDOW ( KIND$ = "A" ) --  When in the
  2170.               scroll window environment if a key pressed equals the key
  2171.  
  2172.  
  2173.  
  2174.                                        30
  2175.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.               character of an item in the scroll window the routine will
  2186.               be exited.  The scroll bar moves to the item found. The
  2187.               position of the selected item in LIST$() will be returned
  2188.               in RTRN%.  If RTRN% = 2, LIST$(2) was selected.  SCRLWIND
  2189.               will exit with RKEY% equal to 13 simulating exit via the
  2190.               ENTER (RETURN) key.
  2191.  
  2192.               NOTE: IF ROUTINE B4SCRL IS USED TO SET A SCROLL WINDOW'S
  2193.               EXIT CRITERIA AND ROUTINE B4SCRL'S ARGUMENT EXIT$ CONTAINS
  2194.               AN "X" THE AUTO-EXIT FEATURE IS DISABLED. ( SEE ROUTINE
  2195.               B4SCRL )
  2196.  
  2197.               MULTIPLE MARK SCROLL WINDOW ( KIND$ = "M" )  -- Pressing
  2198.               the <+> or INSERT key marks the item covered by the scroll
  2199.               bar.  A right arrow is printed to the left of the item in
  2200.               the scroll window to signify it has been marked. The color
  2201.               of this arrow may be changed by routine SETSCRL.  Pressing
  2202.               the <-> or DELETE key un-marks an item if it was marked.
  2203.               Striking the PRINT ( not all systems ) key or SPACE BAR
  2204.               marks all items, unless they were all previously marked,
  2205.               in which case the PRINT ( not all systems ) key or SPACE
  2206.               BAR will un-mark all items.  Pressing the ENTER or RETURN
  2207.               key returns a coded string in KIND$ which represents the
  2208.               marked items.  If KIND$ ="" no items were marked.  If any
  2209.               items were marked KIND$ will be ENTRIES% long.  Each
  2210.               character in KIND$ will correspond to an element in
  2211.               LIST$().  If the first character of KIND$=" " LIST$(1) was
  2212.               not marked. If the second character, in KIND$ = CHR$(16),
  2213.               LIST$(2) was marked.  Each un-marked element of LIST$()
  2214.               will have a corresponding space (" ") in KIND$ while each
  2215.               marked element will have a corresponding right arrow
  2216.               ( CHR$(16) ) in KIND$.  See the description for the
  2217.               function MARKED% for a method of decoding KIND$.  The
  2218.               multiple mark feature is disabled if a scroll window is
  2219.               also defined as a list scroll window or a single mark
  2220.               scroll window.
  2221.  
  2222.               NOTE: THE USE OF ROUTINE B4SCRL AFFECTS MULTIPLE MARK
  2223.               SCROLL WINDOWS AS FOLLOWS:
  2224.  
  2225.               1. IF THE INSERT OR DELETE KEYS ARE SET AS EXIT KEYS BY
  2226.                  ROUTINE B4SCRL THE INSERT AND DELETE KEYS WILL NO
  2227.                  LONGER MARK AND UN-MARK ENTRIES.  THE "+" AND "-" KEYS
  2228.                  WILL STILL MARK AND UN-MARK ENTRIES.
  2229.  
  2230.               2. IF B4SCRL'S ARGUMENT EXIT$ CONTAINS AN "X"  THE SPACE
  2231.                  BAR ( PRINT KEY ON SOME SYSTEMS ) DOES NOT MARK/UN-MARK
  2232.                  ALL ENTRIES.
  2233.  
  2234.  
  2235.               SINGLE MARK SCROLL WINDOW ( KIND$ = "S" ) --- Provided
  2236.               there is more than one item ( ENTRIES% > 1 ) in the scroll
  2237.  
  2238.  
  2239.  
  2240.                                        31
  2241.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.               window, one item will be marked as in the preceding
  2252.               example for a "MULTIPLE MARK" scroll window.  Only one
  2253.               item can be marked, however.  The marked item follows the
  2254.               scroll bar.  Pressing TAB, SHIFT TAB, ENTER, RETURN or ESC
  2255.               will exit the scroll window with the selected item in
  2256.               RTRN% and a representation of the "exit key" in RKEY%.  If
  2257.               the scroll bar is over LIST$(2), RTRN% = 2 was selected.
  2258.               SINGLE MARK scroll windows with one entry ( ENTRIES%=1 )
  2259.               do not have an item marked.  These scroll windows can be
  2260.               used as <OK>, <CANCEL>, <ABORT> etc...  scroll windows.
  2261.  
  2262.               VIEW ONLY SCROLL WINDOW ( KIND$ = "V" OR "SV" ) --- The
  2263.               window will be filled with the strings in LIST$() and the
  2264.               routine will be exited.  IF KIND$ = "SV" the scroll window
  2265.               is "VIEW ONLY -SINGLE MARK" scroll window. If ENTRIES% > 1
  2266.               the item designated by the value of RTRN% will be marked.
  2267.               ( See description for RTRN%. )
  2268.  
  2269.               LIST SCROLL WINDOW ( KIND$ = "L" ) --- This generates a
  2270.               list scroll window.  There is no scroll bar.  This may be
  2271.               useful for viewing virtual scroll windows.  It may be used
  2272.               for regular scroll windows also.
  2273.  
  2274.               Any other value for KIND$ when entering SCRLWIND results
  2275.               in a "REGULAR" scroll window. After the scroll bar is
  2276.               moved to the selected item, pressing the ENTER or RETURN
  2277.               key returns the selected item in RTRN%.  Routine B4SCRL
  2278.               provides alternate means to exit SCRLWIND.
  2279.  
  2280.                            RTRN% serves two purposes. One is to place
  2281.               the scroll bar over the item specified by RTRN% when
  2282.               entering SCRLWIND.  If RTRN% < 1 or RTRN% > ENTRIES%,
  2283.               RTRN% defaults to 1 and the scroll bar will be positioned
  2284.               over the first item in the window.
  2285.  
  2286.               EXAMPLE: RTRN% = 2  --  If there are a minimum of two
  2287.               items in the scroll window ( ENTRIES% > 1 ) the scroll
  2288.               bar will be over LIST$(2) when entering SCRLWIND.
  2289.  
  2290.               RTRN% also returns the selected item when exiting
  2291.               SCRLWIND.   If RTRN% = 2, LIST$(2) was selected when
  2292.               SCRLWIND was exited.  If routine B4SCRL is used prior to
  2293.               calling SCRLWIND it is possible to exit SCRLWIND on any
  2294.               attempt to scroll before the first entry in the scroll
  2295.               window or past the last entry in the scroll window. This
  2296.               feature affects the value of RTRN% ( SEE ROUTINE B4SCRL).
  2297.  
  2298.               NOTE: THE ITEM SELECTED IN LIST$(), AS INDICTED BY THE
  2299.               VALUE OF RTRN%, MAY CONTAIN A "@" TO INDICATE THE KEY
  2300.               CHARACTER.  IF IT IS NECESSARY TO PRINT THE ITEM THE "@"
  2301.               CAN BE REMOVED FROM IT USING THE FOLLOWING FUNCTION.
  2302.  
  2303.  
  2304.  
  2305.  
  2306.                                        32
  2307.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.               ' FUNCTIONS MUST BE DECLARED.  RTRN% = ITEM # SELECTED
  2318.               ' FROM LIST$().
  2319.  
  2320.               DECLARE FUNCTION NO$( ITEM$ )
  2321.               '( Place this at the start of the module.)
  2322.               ' IF RTRN% = 2 AND LIST$(RTRN%) = "Save F@ile", LIST$(2)
  2323.               ' CAN BE PRINTED AS "Save File" as follows.
  2324.  
  2325.               PRINT NO$( LIST$(RTRN%) )
  2326.  
  2327.               ' INCLUDE THIS FUNCTION IN YOUR PROGRAM
  2328.  
  2329.               FUNCTION NO$ ( ITEM$ )
  2330.                 A% = INSTR ( ITEM$, "@" )
  2331.                 IF A% < 3 THEN        ' "@" SHOULD NOT BE IN POSITION
  2332.                    NO$ = ITEM$        ' 1 OR 2, OR NO "@" IS IN ITEM$.
  2333.                 ELSE
  2334.                    NO$ = LEFT$(ITEM$, A% - 1) + MID$(ITEM$, A% + 1)
  2335.                 END IF
  2336.               END FUNCTION
  2337.  
  2338.                            LI%, on entry to routine SCRLWIND, specifies
  2339.               which row ( of the interior of the scroll window ) to
  2340.               place the scroll bar on.  It is used, on entry, with
  2341.               argument RTRN% to place the scroll bar over a specific
  2342.               entry on a specific row.  This is useful if it is
  2343.               necessary to exit a scroll window and re-enter it with the
  2344.               scroll bar over the same entry and on the same line as on
  2345.               the previous exit.  Set this argument to one if it is not
  2346.               required . The following restrictions apply.
  2347.  
  2348.               1. If LI% is less than one or LI% is greater than the
  2349.                  number of entries ( ENTRIES% ) LI% is indeterminate.
  2350.                  The scroll bar will be positioned over the entry
  2351.                  specified by argument RTRN%.
  2352.  
  2353.               2. Argument RTRN% determines the line the scroll bar will
  2354.                  occupy ( argument LI% is ignored ) if an attempt is
  2355.                  made to place an entry on a line greater than the
  2356.                  subscript of the entry.  For example, LIST$(2) can not
  2357.                  be placed on line 3 of the scroll window.  This would
  2358.                  cause line one to be blank.  If RTRN% = 2 on entry, LI%
  2359.                  defaults to 2 also, if LI% is set to a number higher
  2360.                  than 2.
  2361.  
  2362.               3. If all of the entries fit in the scroll window argument
  2363.                  LI% is ignored on entry.  The scroll bar will occupy
  2364.                  the line based on the value of RTRN%.  If RTRN% = 3 the
  2365.                  scroll bar will be positioned on line 3 regardless of
  2366.                  the value of LI%
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.                                        33
  2373.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.  
  2381.  
  2382.  
  2383.               4. If there are more entries than interior rows in the
  2384.                  scroll window, the last "interior rows" of entries fill
  2385.                  in from the bottom of the scroll window.  For example,
  2386.                  assuming a scroll window has 10 interior rows and 20
  2387.                  entries, the 20th entry can be positioned no higher
  2388.                  than the 10th interior row, the 19th entry can be
  2389.                  positioned no higher than the ninth interior row, and
  2390.                  so on.  If one of the last "interior rows" of entries
  2391.                  is specified by argument RTRN% on entry, and LI%
  2392.                  attempts to place the entry on row higher than outlined
  2393.                  above, LI% is adjusted appropriately.
  2394.  
  2395.               On exit from routine SCRLWIND, LI% equals the interior row
  2396.               number of the scroll window that the scroll bar occupied
  2397.               prior to the exit.
  2398.  
  2399.                            FC% is used with virtual scroll windows to
  2400.               position a specified string position for the entries in
  2401.               the scroll window on the first useable column (2) of the
  2402.               scroll window.  On entry to SCRLWIND, FC% sets the string
  2403.               position for the first column of the scroll window.  On
  2404.               exit FC% points to the string position occupying column
  2405.               two.  FC% IS ONLY APPLICABLE TO VIRTUAL SCROLL WINDOWS.
  2406.               FC% has one purpose.  It allows re-entry into a virtual
  2407.               scroll window exactly as it was displayed on exit if used
  2408.               with arguments RTRN% and LI% on re-entry.  Set this
  2409.               argument to one if it is not required.
  2410.  
  2411.               EXAMPLE:  On entry FC% = 5 and LIST$(1) ="12345678901234".
  2412.                         "5678901234" will be displayed in a virtual
  2413.                         scroll window.   The first displayed character
  2414.                         in LIST$(1) will be "5".
  2415.  
  2416.                            RKEY% represents the key or action used to
  2417.               exit SCRLWIND.
  2418.  
  2419.               RKEY% may equal any of the following.
  2420.  
  2421.               RKEY%          EXIT KEY              KIND$
  2422.  
  2423.               ** 1 to 10     F1 to F10             ALL
  2424.  
  2425.               13             ENTER ( RETURN ) or   ALL
  2426.                              AUTO-EXIT FEATURE.
  2427.               14             SHIFT TAB             "S" ( single mark )
  2428.               15             TAB                   "S" ( single mark )
  2429.               27             ESC                   ALL
  2430.  
  2431.               ** 30          HOME                  ALL
  2432.               ** 35          END                   ALL
  2433.  
  2434.               ** 40          INSERT                ALL
  2435.  
  2436.  
  2437.  
  2438.                                        34
  2439.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.  
  2447.  
  2448.  
  2449.               ** 45          DELETE                ALL
  2450.  
  2451.               ** 50          MARK an entry         "M"
  2452.               ** 55          UN-MARK an entry      "M"
  2453.  
  2454.               ** Requires calling routine B4SCRL prior to calling
  2455.                  routine SCRLWIND.  ( SEE ROUTINE B4SCRL ).
  2456.  
  2457.                            KEYATTR% is the color of the key character
  2458.               for each item in the scroll window.  If KEYATTR% = 0
  2459.               the key character will be the same color as the other
  2460.               characters for each window item.  This would be
  2461.               appropriate if the first character in each item is ALWAYS
  2462.               the key character.  KEYATTR% MUST EQUAL ZERO FOR A SCROLL
  2463.               WINDOW TO BE A VIRTUAL SCROLL WINDOW.  IF KEYATTR% = 0 THE
  2464.               SCROLL WINDOW IS TREATED AS A VIRTUAL SCROLL WINDOW.
  2465.               CHECKS TO DETERMINE IF THE ELEMENTS OF LIST$() ARE TOO
  2466.               LONG TO FIT IN THE WINDOW ARE NOT MADE.  Setting KEYATTR%
  2467.               to a different color, or high intensity, allows users to
  2468.               distinguish the character as the key character for each
  2469.               item in the list.  KEYATTR% has no effect on the
  2470.               background color of an item when it is covered by the
  2471.               scroll bar.  It can effect the background color for the
  2472.               key character.  This is useful for computers without high
  2473.               intensity or color capabilities.  IF KEYATTR% <> 0 AND ANY
  2474.               ELEMENTS OF LIST WILL NOT FIT IN THE SCROLL WINDOW
  2475.               ALLOWING A LEADING AND TRAILING SPACE AN ERROR WILL BE
  2476.               REPORTED.  THEREFORE, IF KEYATTR% <> 0 THE SCROLL WINDOW
  2477.               MAY NOT BE A VIRTUAL SCROLL WINDOW.
  2478.  
  2479.               -------------------------------------------------------
  2480.               'EXAMPLE OF A CALL TO SCRLWIND - AUTO EXIT SCROLL WINDOW
  2481.  
  2482.               DIM LIST$(11), INFO$(11)
  2483.               FOR X% = 1 TO 11              'ALWAYS START WITH 1.
  2484.                  READ LIST$(X%)
  2485.                  READ INFO$(X%)             'ONLY INCLUDE IF INFO-LINE
  2486.               NEXT                          'IS USED.
  2487.  
  2488.  
  2489.               CALL MAKEWIND(15, "", 1, 1, 10, 13, 112, 2)
  2490.               KIND$ = "A" : RTRN% = 3: KEYATTR% = 116: LI%=1: FC%=1
  2491.               CALL SCRLWIND (LIST$(), INFO$(), "", 11, KIND$, RTRN%, LI%,
  2492.                              FC%, RKEY%, 116)
  2493.  
  2494.               ' THE ABOVE CALL TO SCRLWIND MUST BE TYPED ON ONE LINE IN
  2495.               ' QB/QBX.
  2496.  
  2497.               DATA ONE                          : 'LIST$(1)
  2498.               DATA INFO-LINE FOR ONE            : 'INFO$(1)
  2499.               DATA TW@O                         : 'LIST$(2)
  2500.               ' FOR ABOVE KEY CHAR. = "W"
  2501.  
  2502.  
  2503.  
  2504.                                        35
  2505.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.  
  2513.  
  2514.  
  2515.               DATA INFO-LINE FOR TWO            : 'INFO$(2)
  2516.               DATA TH@REE
  2517.               ' FOR ABOVE KEY CHAR. = "H"
  2518.               DATA INFO-LINE FOR THREE
  2519.               DATA FOUR
  2520.               DATA INFO-LINE FOR FOUR
  2521.               DATA FIV@E
  2522.               ' FOR ABOVE KEY CHAR. = "V"
  2523.               DATA INFO-LINE FOR FIVE
  2524.               DATA "-"                         : 'LIST$(5)
  2525.               ' ABOVE DATA STATEMENT PUTS A SEGMENTING LINE IN ROW 6
  2526.               DATA ""                          : 'NULL IN INFO$(5)
  2527.               DATA SIX@
  2528.               ' FOR ABOVE KEY CHAR. = "X"
  2529.               DATA INFO-LINE FOR SIX
  2530.               DATA SEVEN
  2531.               DATA INFO-LINE FOR SEVEN
  2532.               DATA EIGHT
  2533.               DATA INFO-LINE FOR EIGHT
  2534.               DATA NINE
  2535.               DATA INFO-LINE FOR NINE
  2536.               DATA TEN                         : 'LIST$(11)
  2537.               DATA INFO-LINE FOR TEN           : 'INFO$(11)
  2538.               -------------------------------------------------------
  2539.               The scroll window is the window defined by the call to
  2540.               MAKEWIND as it is the active window when SCRLWIND is
  2541.               called.  The entries in the scroll window and the text for
  2542.               the info-line are the items in the data statements, as
  2543.               they are read into LIST$() and INFO$(). The fourth
  2544.               parameter in the call to SCRLWIND is the number of items
  2545.               in the list ( 11 ).  As KIND$ ="A" before calling
  2546.               SCRLWIND, the scroll window is an "AUTO-EXIT SCROLL"
  2547.               window.  Since RTRN% = 3 when entering SCRLWIND the scroll
  2548.               bar will start over the third item ( THREE ).  The sixth
  2549.               DATA item for LIST$() loads LIST$(6) with "-".  Therefore,
  2550.               a line will print in row six of the scroll window.  The
  2551.               key character for each item will be red (KEYATTR% = 116 ).
  2552.               RTRN% will equal the selected item, and RKEY% will
  2553.               represent the exit key when SCRLWIND is exited.  As
  2554.               reading the data takes time, quicker scroll windows will
  2555.               be generated if all arrays used in scroll windows are
  2556.               filled using READ and DATA statement during program
  2557.               initialization.
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.                                        36
  2571.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.          3.02 B4SCRL ( EXIT$, MARK$ )
  2582.  
  2583.               Description: Sets the "exit keys" or "exit circumstances"
  2584.               for a subsequent call to SCRLWIND.  Sets the marked
  2585.               ( tagged ) entries for a subsequent call to SCRLWIND.
  2586.  
  2587.               NOTE1: IT IS NOT NECESSARY TO CALL B4SCRL PRIOR TO CALLING
  2588.               SCRLWIND UNLESS ONE OF B4SCRL'S FEATURES ARE REQUIRED.
  2589.  
  2590.               NOTE2: B4SCRL ONLY AFFECTS THE NEXT CALL TO SCRLWIND FOR
  2591.               ARGUMENTS EXIT$ AND MARK$.  THEREFORE, IF B4SCRL IS
  2592.               REQUIRED FOR A PARTICULAR SCROLL WINDOW IT MUST ALWAYS BE
  2593.               CALLED PRIOR TO CALLING SCRLWIND FOR THAT SCROLL WINDOW.
  2594.               ALWAYS PLACE A CALL TO B4SCRL, IF IT IS REQUIRED,
  2595.               IMMEDIATELY BEFORE THE CALL TO SCRLWIND.
  2596.  
  2597.               EXAMPLE: CALL B4SCRL (......   ' IF B4SCRL IS REQUIRED
  2598.                        CALL SCRLWIND (.....  ' IT MUST PRECEDE SCRLWIND.
  2599.  
  2600.                        CALL SCRLWIND (.......' THE PREVIOUS CALL TO
  2601.                                              ' B4SCRL DOES NOT AFFECT
  2602.                                              ' THIS CALL TO SCRLWIND.
  2603.  
  2604.               Arguments:   EXIT$ sets the exit keys or exit
  2605.               circumstances for a subsequent call to SCRLWIND.
  2606.               Normally SCRLWIND exits via the ESC or ENTER keys.  There
  2607.               is no need to use B4SCRL to provide alternate means to
  2608.               exit unless the scroll window requires same.  EXIT$ may be
  2609.               any combination of the following.
  2610.  
  2611.                 "E"         The ESC key will exit SCRLWIND.
  2612.                 "R"         The ENTER (RETURN) key will exit SCRLWIND.
  2613.                 "0"         The F10 key will exit SCRLWIND.
  2614.                 "1" to "9"  The F1 to F9 keys will exit SCRLWIND.
  2615.                 "I"         The INSERT key will exit SCRLWIND.
  2616.                 "D"         The DELETE key will exit SCRLWIND.
  2617.  
  2618.                 "X"         This makes the scroll window an "EXTENDABLE"
  2619.                             scroll window.  Any attempt to scroll past
  2620.                             the last entry ( PAGE DOWN or DOWN ARROW )
  2621.                             in the scroll window or scroll before the
  2622.                             first entry ( PAGE UP or UP ARROW ) in the
  2623.                             scroll window will exit SCRLWIND.  The HOME
  2624.                             or END keys exit SCRLWIND.  If the scroll
  2625.                             window is a multiple mark scroll window
  2626.                             ( argument KIND$ for routine SCRLWIND equals
  2627.                             "M" ) any change in mark status of an entry
  2628.                             will exit SCRLWIND.  ( FURTHER EXPLANATION
  2629.                             AND RESTRICTIONS FOLLOW.  )
  2630.  
  2631.               EXAMPLE: EXIT$ = "12DR"  The F1, F2, DELETE, and ENTER
  2632.                                        keys exit routine SCRLWIND.
  2633.  
  2634.  
  2635.  
  2636.                                        37
  2637.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.               NOTE1:  IF EXIT$ CONTAINS AN "X" THE SCROLL WINDOW IS AN
  2648.               "EXTENDABLE" SCROLL WINDOW.  ALL ENTRIES MUST FIT IN THE
  2649.               SCROLL WINDOW OR AN ERROR WILL BE REPORTED.  IF THERE ARE
  2650.               10 INTERIOR ROWS IN THE SCROLL WINDOW THE NUMBER OF
  2651.               ENTRIES ( ARGUMENT ENTRIES% FOR ROUTINE SCRLWIND ) MUST BE
  2652.               EQUAL TO, OR LESS THAN, 10.
  2653.  
  2654.               NOTE2:  IF THE INSERT OR DELETE KEYS ARE USED AS EXIT KEYS
  2655.               AND THE SCROLL WINDOW IS A MULTIPLE MARK, EXTENDABLE,
  2656.               SCROLL WINDOW THE INSERT AND DELETE KEYS WILL NO LONGER
  2657.               MARK AND UN-MARK ENTRIES.  THE "+" AND "-" KEYS WILL STILL
  2658.               MARK AND UN-MARK ENTRIES, HOWEVER.
  2659.  
  2660.               Placing an "X" in EXIT$ makes the scroll window an
  2661.               "EXTENDABLE" scroll window.  This provides the ability to
  2662.               scroll through records in large random access, binary,
  2663.               ISAM, BTRIEVE, or many other data files.  On entry to
  2664.               SCRLWIND memory constraints may prohibit placing all
  2665.               records in a database in a scroll window.  With
  2666.               "EXTENDABLE" scroll windows, the first 15 records of a
  2667.               data file may be placed in a scroll window with 15
  2668.               interior rows.
  2669.  
  2670.               NOTE:  THE NUMBER OF INTERIOR ROWS IN A SCROLL WINDOW IS
  2671.               EQUAL TO THE NUMBER OF ROWS IN THE WINDOW ( AS SET BY THE
  2672.               CALL TO MAKEWIND FOR THE SCROLL WINDOW ) MINUS 2 IF THE
  2673.               CALL TO MAKEWIND DID NOT SPECIFY A TITLE BOX.  IF THE CALL
  2674.               TO MAKEWIND SPECIFIED A TITLE BOX THE NUMBER OF INTERIOR
  2675.               ROWS EQUALS THE ROWS SET BY THE CALL TO MAKEWIND MINUS 4.
  2676.  
  2677.               An attempt to scroll past the 15th record in the scroll
  2678.               window or before the first record in the scroll window
  2679.               causes SCRLWIND to be exited.  Argument RKEY% ( from
  2680.               routine SCRLWIND ) can be used to determine the key or
  2681.               circumstance which caused the exit.  The following lists
  2682.               the values returned by SCRLWIND's argument RKEY% which are
  2683.               unique to "EXTENDABLE" scroll windows.
  2684.  
  2685.               - RKEY% = 19 -- The DOWN ARROW was pressed ( SEE FOLLOWING
  2686.                 NOTE ) with the scroll bar on the last entry in the
  2687.                 scroll window.  An attempt is being made to access the
  2688.                 next record ( relative to the last record in the scroll
  2689.                 window ) in the data file.  On exit, a check should be
  2690.                 made to determine if the last record in the scroll
  2691.                 window is not the last record in the data file.  If it
  2692.                 is not, all records in SCRLWIND's arguments LIST$()
  2693.                 should be shifted to the preceding element of LIST$().
  2694.                 The last element of LIST$() should be filled with the
  2695.                 next record.
  2696.  
  2697.  
  2698.  
  2699.  
  2700.  
  2701.  
  2702.                                        38
  2703.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.                     ( FILEPOINTER MUST = LAST RECORD IN SCROLL WINDOW )
  2714.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2715.                     ( ENTRIES% = NUMBER OF ENTRIES IN THE WINDOW )
  2716.  
  2717.                     IF FILEPOINTER < MAX THEN
  2718.                       FILEPOINTER = FILEPOINTER + 1
  2719.                       FOR X% = 1 TO ENTRIES% - 1
  2720.                          SWAP LIST$(X%), LIST$(X% + 1)
  2721.                       NEXT
  2722.                       ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2723.                       ' POSITION FILEPOINTER.
  2724.                       LIST$(ENTRIES%) = THE RECORD
  2725.                     END IF
  2726.  
  2727.                 The scroll window should then be re-entered.
  2728.                 FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
  2729.                 WINDOW.
  2730.  
  2731.               NOTE: RKEY% MAY ALSO EQUAL 19 IF THE SCROLL WINDOW IS A
  2732.               MULTIPLE MARK, EXTENDABLE, SCROLL WINDOW AND A MARK KEY
  2733.               ( INS, DEL, +, or - ) IS PRESSED WITH THE SCROLL BAR ON
  2734.               THE LAST ENTRY.  IF THE ENTRY DOES NOT CHANGE "MARK"
  2735.               STATUS RKEY% WILL EQUAL 19 EMULATING THE DOWN ARROW KEY.
  2736.               IF THE ENTRY CHANGES "MARK" STATUS RKEY% WILL EQUAL 50 OR
  2737.               55.  SEE DESCRIPTIONS FOR RKEY% = 50 AND RKEY% = 55 TO SEE
  2738.               HOW TO MOVE TO THE NEXT RECORD WHEN RKEY% = 50 OR RKEY% =
  2739.               55.
  2740.  
  2741.  
  2742.               - RKEY% = 16 -- The UP ARROW was pressed with the scroll
  2743.                 bar on the first entry in the scroll window.  An attempt
  2744.                 is being made to access the preceding record ( relative
  2745.                 to the first record in the scroll window ) in the data
  2746.                 file.  On exit, a check should be made to determine if
  2747.                 the first record in the scroll window is not the first
  2748.                 record in the data file.  If it is not, all records in
  2749.                 SCRLWIND's arguments LIST$() should be shifted to the
  2750.                 next element of LIST$().
  2751.  
  2752.                     ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
  2753.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2754.                     ( ENTRIES% = NUMBER OF ENTRIES IN THE WINDOW )
  2755.  
  2756.                     IF FILEPOINTER > 1 THEN
  2757.                       FILEPOINTER = FILEPOINTER - 1
  2758.                       FOR X% = ENTRIES% TO 2 STEP - 1
  2759.                         SWAP LIST$(X%), LIST$(X% - 1)
  2760.                       NEXT
  2761.                      ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2762.                      ' POSITION FILEPOINTER .
  2763.                       LIST$(1) = THE RECORD
  2764.                     END IF
  2765.  
  2766.  
  2767.  
  2768.                                        39
  2769.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.                 The scroll window should then be re-entered.
  2780.                 FILEPOINTER POINTS TO THE FIRST ENTRY IN THE SCROLL
  2781.                 WINDOW.
  2782.  
  2783.  
  2784.               - RKEY% = 11 -- The PAGE UP key was pressed.  A check
  2785.                 should be made to determine if the are enough preceding
  2786.                 records in the data file to update LIST$(1) to
  2787.                 LIST$( INTERIOR ROWS IN THE SCROLL WINDOW ) with
  2788.                 preceding records ( relative to the first record in the
  2789.                 scroll window).  If there are, LIST$() should be
  2790.                 refreshed with those records.
  2791.  
  2792.                     ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
  2793.                     ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
  2794.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2795.  
  2796.                     ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
  2797.                     TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
  2798.  
  2799.                     RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
  2800.                     HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
  2801.  
  2802.                     FILEPOINTER = FILEPOINTER - ROWS%
  2803.  
  2804.                     ( If there are not enough preceding records in the
  2805.                     scroll window FILEPOINTER should be set to the first
  2806.                     record. )
  2807.  
  2808.                     IF FILEPOINTER < 1 THEN FILEPOINTER = 1
  2809.  
  2810.                     ENTRIES% = 0
  2811.                     WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
  2812.                       ENTRIES%=ENTRIES% + 1
  2813.                       ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2814.                       ' POSITION FILEPOINTER .
  2815.                       LIST%(ENTRIES%)= THE RECORD
  2816.                       FILEPOINTER = FILEPOINTER + 1
  2817.                     WEND
  2818.                     FILEPOINTER = FILEPOINTER - 1
  2819.                     RTRN% = 1     ' HIGHLIGHT FIRST SCROLL WINDOW ENTRY.
  2820.  
  2821.                 The scroll window should then be re-entered.
  2822.                 FILEPOINTER POINTS TO THE LAST ENTRY IN THE SCROLL
  2823.                 WINDOW.
  2824.  
  2825.  
  2826.               - RKEY% = 12 -- The PAGE DOWN key was pressed.  A check
  2827.                 should be made to determine if the are enough records
  2828.                 ( relative to the last record in the scroll window ) in
  2829.                 the data file to update LIST$(1) to LIST$( INTERIOR ROWS
  2830.                 IN THE SCROLL WINDOW ) with new records ( relative to
  2831.  
  2832.  
  2833.  
  2834.                                        40
  2835.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.                 the last record in the scroll window ). If there are,
  2846.                 LIST$() should be refreshed with these records.
  2847.  
  2848.                     ( FILEPOINTER MUST = LAST RECORD IN SCROLL WINDOW )
  2849.                     ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
  2850.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2851.  
  2852.                     ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
  2853.                     TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
  2854.  
  2855.                     RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
  2856.                     HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
  2857.  
  2858.                     IF FILEPOINTER + ROWS > MAX THEN
  2859.                       FILEPOINTER = ( MAX - ROWS% + 1 )
  2860.                       IF FILEPOINTER < 1 THEN FILEPOINTER = 1
  2861.                     ELSE
  2862.                       FILEPOINTER = FILEPOINTER + 1
  2863.                     END IF
  2864.  
  2865.                     ENTRIES% = 0
  2866.                     WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
  2867.                      ENTRIES%=ENTRIES% + 1
  2868.                      ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2869.                      ' POSITION FILEPOINTER.
  2870.                      LIST%(ENTRIES%) = THE RECORD
  2871.                      FILEPOINTER = FILEPOINTER + 1
  2872.                     WEND
  2873.                     FILEPOINTER = FILEPOINTER - 1
  2874.                     RTRN% = ENTRIES%
  2875.  
  2876.                 The scroll window should then be re-entered.
  2877.                 FILEPOINTER POINTS TO THE LAST ENTRY IN THE SCROLL
  2878.                 WINDOW.
  2879.  
  2880.  
  2881.               - RKEY% = 30 -- The HOME key was pressed.  The scroll
  2882.                 window should be filled with the first records in the
  2883.                 data file.
  2884.  
  2885.                     ( FILEPOINTER MUST = FIRST RECORD IN THE DATA FILE )
  2886.                     ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
  2887.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2888.  
  2889.                     ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
  2890.                     TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
  2891.  
  2892.                     RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
  2893.                     HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.                                        41
  2901.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.                     FILEPOINTER = 1
  2912.  
  2913.                     ENTRIES% = 0
  2914.                     WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
  2915.                      ENTRIES%=ENTRIES% + 1
  2916.                      ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2917.                      ' POSITION FILEPOINTER .
  2918.                      LIST%(ENTRIES%)=RECORD
  2919.                      FILEPOINTER = FILEPOINTER + 1
  2920.                     WEND
  2921.                     FILEPOINTER = FILEPOINTER - 1
  2922.                     RTRN% = 1    ' HIGHLIGHT FIRST SCROLL WINDOW ENTRY.
  2923.  
  2924.                 The scroll window should then be re-entered.
  2925.                 FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
  2926.                 WINDOW.
  2927.  
  2928.  
  2929.               - RKEY% = 35 -- The END key was pressed.  The scroll
  2930.                 window should be filled with the last records in the
  2931.                 data file.
  2932.  
  2933.                     ( FILEPOINTER MUST BE SET TO THE CORRECT RECORD )
  2934.                     ( ROWS% = INTERIOR ROWS IN SCROLL WINDOW )
  2935.                     ( MAX = NUMBER OF RECORDS IN FILE )
  2936.  
  2937.                     ENTRIES% WILL BE USED BY THE NEXT CALL TO SCRLWIND
  2938.                     TO SET THE NUMBER OF ENTRIES IN THE SCROLL WINDOW.
  2939.  
  2940.                     RTRN% WILL BE DETERMINE WHICH ENTRY WILL BE
  2941.                     HIGHLIGHTED ON THE NEXT CALL TO SCRLWIND.
  2942.  
  2943.                     FILEPOINTER = MAX - ROWS% + 1
  2944.                     IF FILEPOINTER < 1 THEN FILEPOINTER = 1
  2945.  
  2946.                     ENTRIES% = 0
  2947.                     WHILE ENTRIES% < ROWS% AND ENTRIES% < MAX
  2948.                      ENTRIES%=ENTRIES% + 1
  2949.                      ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2950.                      ' POSITION FILEPOINTER .
  2951.                      LIST%(ENTRIES%)=RECORD#
  2952.                      FILEPOINTER = FILEPOINTER + 1
  2953.                     WEND
  2954.                     FILEPOINTER = FILEPOINTER - 1
  2955.                     RTRN% = ENTRIES%   ' HIGHLIGHT LAST ENTRY.
  2956.  
  2957.                 The scroll window should then be re-entered.
  2958.                 FILEPOINTER POINTS TO THE LAST RECORD IN THE SCROLL
  2959.                 WINDOW AND IN THE DATA FILE.
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.                                        42
  2967.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976.  
  2977.               - RKEY% = 50 -- The scroll window is a "MARK", extendable,
  2978.                 scroll window.  An un-marked entry was marked.  ( SEE
  2979.                 DESCRIPTION FOR ARGUMENT MARK$ FOR THIS ROUTINE ).  To
  2980.                 determine which record was marked;
  2981.  
  2982.                     ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
  2983.                     ( RTRN% IS RETURNED BY ROUTINE SCRLWIND. IT
  2984.                       POINTS TO THE "MARKED" ENTRY )
  2985.  
  2986.                     ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  2987.                     ' POSITION FILEPOINTER + RTRN% - 1.
  2988.  
  2989.                     ' UPDATE THE RECORD TO SHOW IT IS MARKED.
  2990.  
  2991.                     RTRN% = RTRN% + 1     ' MOVE TO THE NEXT ENTRY
  2992.  
  2993.                     IF RTRN% > ENTRIES% -- GO TO THE ROUTINE USED FOR
  2994.                                            THE DOWN ARROW ( RKEY% = 16 )
  2995.  
  2996.                 The scroll window should then be re-entered.
  2997.                 FILEPOINTER POINTS TO THE FIRST RECORD IN THE SCROLL
  2998.                 WINDOW.
  2999.  
  3000.  
  3001.               - RKEY% = 55 -- The scroll window is a "MARK" ( and
  3002.                 "EXTENDABLE" ) scroll window.  An marked entry was un-
  3003.                 marked.  ( SEE DESCRIPTION FOR ARGUMENT MARK$ FOR THIS
  3004.                 ROUTINE).  To determine which record was marked;
  3005.  
  3006.                     ( FILEPOINTER MUST = FIRST RECORD IN SCROLL WINDOW )
  3007.                     ( RTRN% IS RETURNED BY ROUTINE SCRLWIND. IT
  3008.                       POINTS TO THE "MARKED" ENTRY )
  3009.  
  3010.                     ' DO WHAT YOUR DATABASE REQUIRES GET A RECORD AT
  3011.                     ' POSITION FILEPOINTER + RTRN% - 1.
  3012.  
  3013.                     ' UPDATE THE RECORD TO SHOW IT IS NOT MARKED.
  3014.  
  3015.                     RTRN% = RTRN% + 1     ' MOVE TO THE NEXT ENTRY
  3016.  
  3017.                     IF RTRN% > ENTRIES% -- GO TO THE ROUTINE USED FOR
  3018.                                            THE DOWN ARROW ( RKEY% = 16 )
  3019.  
  3020.                 The scroll window should then be re-entered.
  3021.                 FILEPOINTER POINTS TO THE FIRST RECORD IN THE SCROLL
  3022.                 WINDOW.
  3023.  
  3024.                 NOTE: "EXTENDABLE" SCROLL WINDOWS ONLY EXIT WITH RKEY%
  3025.                 EQUAL TO 50 OR RKEY% EQUAL TO 55 IF A CHANGE IN "MARK"
  3026.                 STATUS FOR AN ENTRY OCCURS.  AN ATTEMPT TO MARK A
  3027.                 PREVIOUSLY MARKED ENTRY OR UN-MARK A PREVIOUSLY UN-
  3028.                 MARKED ENTRY WILL NOT EXIT ROUTINE SCRLWIND.
  3029.  
  3030.  
  3031.  
  3032.                                        43
  3033.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.  
  3041.  
  3042.  
  3043.               - RKEY% = 1 TO 10, 13, 27, 40, or 45 -- These values for
  3044.               RKEY% are not unique to an "EXTENDABLE" scroll window.
  3045.               They remain available as a means to exit an "EXTENDABLE"
  3046.               scroll window, however.  SEE ARGUMENT RKEY% FOR ROUTINE
  3047.               SCRLWIND.
  3048.  
  3049.               NOTE: WHEN A SCROLL WINDOW IS AN EXTENDABLE SCROLL WINDOW
  3050.               IT'S OPTIONS ARE AFFECTED AS FOLLOWS:
  3051.  
  3052.               1. PRESSING THE FIRST LETTER OF AN ENTRY OR "KEY
  3053.                  CHARACTER" OF AN ENTRY DOES NOT MOVE THE SCROLL BAR TO
  3054.                  THE ENTRY.  AS THE SEARCH IS CONFINED TO THE ENTRIES IN
  3055.                  THE SCROLL WINDOW, AND ALL OF THE RECORDS ARE NOT IN
  3056.                  THE SCROLL WINDOW, "KEY CHARACTERS", ARE USELESS.
  3057.  
  3058.               2. AUTO-EXIT SCROLL WINDOWS ARE NOT PERMITTED ALSO, FOR
  3059.                  THE SAME REASON.  TO SEARCH FOR A RECORD, THE F1 KEY,
  3060.                  FOR EXAMPLE, CAN BE USED TO EXIT SCRLWIND AND PROMPT
  3061.                  THE USER FOR A SEARCH CRITERIA.  THE DATABASE CAN BE
  3062.                  SEARCHED, AND IF A MATCH IS FOUND, SCRLWIND MAY BE RE-
  3063.                  ENTERED DISPLAYING THE "FOUND" RECORD.
  3064.  
  3065.               3. THE OPTIONAL POSITION ARROW ON THE RIGHT BORDER OF THE
  3066.                  SCROLL WINDOW IS DISABLED FOR THE CALL TO SCRLWIND.
  3067.  
  3068.               4. THE SPACE BAR ( PRINT KEY ON SOME SYSTEMS ) DOES NOT
  3069.                  MARK/UN-UNMARK ALL ENTRIES IN MULTIPLE MARK SCROLL
  3070.                  WINDOWS.
  3071.  
  3072.                            MARK$ is a string representing those entries,
  3073.               on entering SCRLWIND, to be marked.  This is only
  3074.               appropriate if the scroll window is a multiple mark scroll
  3075.               window ( SCRLWIND's argument KIND$ = "M" ).  MARK$ must be
  3076.               the exact length as the number of entries in the scroll
  3077.               window.  IF IT IS NOT IT IS IGNORED!  On entry to routine
  3078.               SCRLWIND a space ( CHR$(32) ) in MARK$ is decoded as an
  3079.               un-marked entry.  If the first character of MARK$ = " "
  3080.               the first entry in the scroll window will not be marked.
  3081.               An arrow ( CHR$(16) ) in MARK$ is decoded as a marked
  3082.               entry.  If the second character of MARK$ = CHR$(16) the
  3083.               second entry in the scroll window is marked.  Each
  3084.               character in MARK$ represents a marked or un-marked entry
  3085.               in the scroll window.  On exit from routine SCRLWIND,
  3086.               SCRLWIND's argument KIND$ holds the string representation
  3087.               for those marked and un-marked items.  B4SCRL's argument
  3088.               MARK$ holds the string representation on entry only.  If
  3089.               the scroll window is to be re-entered it is necessary to
  3090.               refresh MARK$.  The following example demonstrates this.
  3091.  
  3092.               REENTER:
  3093.  
  3094.               KIND$ = "M"     ' MAKE A MULTIPLE MARK SCROLL WINDOW
  3095.  
  3096.  
  3097.  
  3098.                                        44
  3099.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.               CALL B4SCRL ("", MARK$ )     ' ENTER WITH SOME ENTRIES
  3110.                                             ' MARKED.
  3111.  
  3112.               ' WHILE IN THE SCROLL WINDOW ENVIRONMENT THE MARKED
  3113.               ' ENTRIES MAY CHANGE.
  3114.               CALL SCRLWIND ( L$(), I$(), TL$, ENTRIES%, KIND$ ........
  3115.  
  3116.               ' KIND$ REPRESENTS THE MARKED ENTRIES ON EXIT
  3117.  
  3118.               MARK$ = KIND$    ' MARK$ MUST BE REFRESHED IF THE SCROLL
  3119.                                ' WINDOW IS TO BE RE-ENTERED
  3120.  
  3121.               ' KIND$ = "" IF NOTHING WAS MARKED.  IF LENGTH OF MARK$ IS
  3122.               ' NOT ENTRIES% LONG IT IS IGNORED, THEREFORE ON RE-ENTRY
  3123.               ' NO ENTRIES ARE MARKED.
  3124.  
  3125.               GOTO REENTER
  3126.  
  3127.               NOTE: IT IS THE PROGRAMMER'S RESPONSIBILITY TO ASSURE
  3128.               MARK$ CONTAINS SPACES ( " " ) AND ARROWS ( CHR$(16) )
  3129.               ONLY.  ANY OTHER CHARACTERS WILL MARK ENTRIES WITH THAT
  3130.               CHARACTER ON ENTRY ONLY.  IF THE ENTRY IS UN-MARKED AND
  3131.               RE-MARKED IN THE SCROLL WINDOW ENVIRONMENT THE NORMAL MARK
  3132.               CHARACTER IS USED.
  3133.  
  3134.  
  3135.          3.03 MARKED% (KIND$, START%)
  3136.  
  3137.               Description: MARKED%(KIND$, START%) is a function used
  3138.               to decode SCRLWIND's argument KIND$ after a multiple mark
  3139.               scroll window is exited.  MARKED%(KIND$, START%) will equal
  3140.               the next position in KIND$ starting from position START%
  3141.               which contains a CHR$(16).  If the third element (item)
  3142.               in LIST$() was marked in the call to SCRLWIND and START%
  3143.               =1, THEN: MARKED%(KIND$,START%) = 3.
  3144.  
  3145.               Arguments:   KIND$ is the string returned by calling
  3146.               SCRLWIND with the MARKED option ON. KIND$ = "" if no
  3147.               items were marked.
  3148.  
  3149.                           START% is the position in KIND$ to start
  3150.               searching for a CHR$(16).  A CHR$(16) in  KIND$
  3151.               represents a marked element in the string array LIST$()
  3152.               used in SCRLWIND. Every time a position in KIND$ is
  3153.               found which corresponds to a marked element of LIST$(),
  3154.               START% is set to a new value which is equal to the
  3155.               "marked" position in KIND$ + 1.  This is the next
  3156.               position in KIND$ where the search will start for
  3157.               another "marked" position. If MARKED% =0 there are no
  3158.               more "marked" positions in KIND$ or KIND$ = "".
  3159.  
  3160.  
  3161.  
  3162.  
  3163.  
  3164.                                        45
  3165.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.               -------------------------------------------------------
  3176.               'EXAMPLE USING THE FUNCTION MARKED% (KIND$,START%) THIS
  3177.               'EXAMPLE PRINTS THE MARKED ITEMS IN LIST$() AFTER A CALL
  3178.               'TO SCRLWIND.
  3179.  
  3180.               'GIVEN: SCRLWIND HAS BEEN CALLED. THE FOURTH AND TENTH
  3181.               'ELEMENTS OF LIST$() WERE MARKED.  KIND$ WAS RETURNED BY
  3182.               'A PREVIOUS THE CALL TO SCRLWIND.
  3183.  
  3184.               DECLARE FUNCTION MARKED% (KIND$, START%) ' MUST BE IN
  3185.               '(Put this at the start of the module)   ' MODULE USING
  3186.                                                        ' FUNC. MARKED%.
  3187.  
  3188.               START%=1     ' START THE SEARCH AT POSITION 1 OF KIND$.
  3189.               DO                                   ' MARKED% = 0 AFTER
  3190.                  A% = MARKED%(KIND$, START%)       ' ALL MARKED ITEMS
  3191.                  IF A% = 0 THEN EXIT DO            ' ARE FOUND OR IF
  3192.                    PRINT LIST$(A%)
  3193.                  END IF
  3194.               LOOP
  3195.               -------------------------------------------------------
  3196.               The first time through the loop, MARKED% (KIND$, START%)
  3197.               will equal 4, and LIST$(4) will print.  START% is auto-
  3198.               matically set to 5, the next position to start searching
  3199.               KIND$ for a "marked" position in KIND$.  The second loop
  3200.               will set MARKED% (KIND$,START%) to 10 and LIST$(10) will
  3201.               print.  As there are no more marked positions, MARKED% =
  3202.               0 and the loop be exited.
  3203.  
  3204.  
  3205.  
  3206.  
  3207.  
  3208.  
  3209.  
  3210.  
  3211.  
  3212.  
  3213.  
  3214.  
  3215.  
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.                                        46
  3231.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.  
  3239.  
  3240.  
  3241.                           ***** GET ANSWER WINDOWS *****
  3242.  
  3243.           This routine pauses the program, prompts the user, and waits
  3244.           for the user to press a key.  The key may be any key, or an
  3245.           individual key from a list of permissible keys.  The prompt
  3246.           may, optionally, be windowed.  The area covered by prompt and
  3247.           window, if one exists, is restored after the key or ENTER is
  3248.           pressed.
  3249.  
  3250.           NOTE: THERE ARE TWO MODES OF OPERATION FOR THIS ROUTINE.  SEE
  3251.           THE DESCRIPTION FOR THE ARGUMENT ANS$ FOR DETAILS.
  3252.  
  3253.          4.00 GETANS (PROMPT$, CHOICE$, ANS$, TR%, LC%, ATTR%, BORDER%)
  3254.  
  3255.               Description: Generates a prompt with an optional window
  3256.               and pauses, waiting for a single key reply.  Pressing ENTER
  3257.               to finalize the selection is optional.
  3258.  
  3259.               Arguments:   PROMPT$ is the prompt ( i.e. Press any key )
  3260.               or question ( i.e. Are you sure?  Y/N ).  It may be
  3261.               optionally windowed ( SEE BORDER% ).  The width of the
  3262.               window is determined by the length of PROMPT$.  If
  3263.               PROMPT$ is too long making the window, or prompt, too
  3264.               wide to fit on the screen an error will be reported.
  3265.  
  3266.                            CHOICE$ is the valid keys the user can
  3267.               press to exit GETANS.  If CHOICE$ = "" any key will
  3268.               exit.  This would be appropriate if PROMPT$ = "Press any
  3269.               key".  If CHOICE$ = "YN" then the "Y", "y", "N" or
  3270.               "n" keys will exit GETANS.  The ESC key will always exit
  3271.               regardless of CHOICE$.
  3272.  
  3273.                            ANS$ serves two purposes.  On entry ANS$
  3274.               determines the mode of operation for routine GETANS.
  3275.               There are two modes of operation for this routine.
  3276.  
  3277.               1. If argument ANS$ = "" on entry, as soon as a valid key
  3278.                  is pressed the routine is exited.
  3279.  
  3280.                   EXAMPLE: ANS$ = ""
  3281.                            CALL GETANS ( PROMPT$, "YN", ANS$ ......
  3282.  
  3283.                   As soon a "Y" or "N" is pressed the routine is exited
  3284.                   with the key pressed returned in ANS$
  3285.  
  3286.               2. If argument ANS$ equals any letter on entry the letter
  3287.                  is displayed in the get answer window to the right of
  3288.                  the prompt.  The user may press any valid key
  3289.                  predicated on argument CHOICE$.  The letter represented
  3290.                  by the valid key is displayed in the get answer window.
  3291.                  The user must press ENTER to accept the choice.
  3292.  
  3293.  
  3294.  
  3295.  
  3296.                                        47
  3297.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.                   EXAMPLE: ANS$ = "N"
  3308.                            CALL GETANS ( PROMPT$, "YN", ANS$........
  3309.  
  3310.                   On entry an "N" will appear after the prompt.  If a
  3311.                   "Y" is pressed it will appear after the prompt.  The
  3312.                   user must press ENTER to exit the routine with the
  3313.                   displayed letter returned in ANS$.
  3314.  
  3315.               On exit ANS$ holds the key pressed.  It is returned in
  3316.               upper case.   If CHOICE$ = "" then ANS$ = "".  If ESC is
  3317.               pressed CHR$(27) is always returned in ANS$.
  3318.  
  3319.                            TR% is the top row.  See MAKEWIND
  3320.  
  3321.                            LC% is the left column.  See MAKEWIND
  3322.  
  3323.                            ATTR% is the color designation.  See
  3324.               MAKEWIND.  Although it is permissible to set ATTR% > 127
  3325.               to make the border flash the text will not flash. If ANS$
  3326.               equals a letter, on entry, the letter is displayed next to
  3327.               the prompt.  The color of this letter is the inverse of
  3328.               the color of the get answer window.  If the window has a
  3329.               white background with a black foreground the displayed
  3330.               letter will have a black background with a white
  3331.               foreground.  To make the foreground color of the displayed
  3332.               letter high intensity add 1000 to ATTR%
  3333.  
  3334.               EXAMPLE: ANS$ = "N":  ATTR% = 1112  ( 1000 + 112 )
  3335.  
  3336.               The get answer window is white with a black foreground.
  3337.               The "N" has a black background.  As 1000 is added to
  3338.               ATTR% the foreground for the "N" is high intensity white.
  3339.  
  3340.                            BORDER% is the window's border designation.
  3341.               Title boxes ( BORDER% > 42 ) are not permitted.  Set
  3342.               BORDER% to 0 for no window ( prompt only ). SEE THE
  3343.               BORDER DESIGNATION CHART.
  3344.  
  3345.               EXAMPLE OF A CALL TO GETANS:
  3346.  
  3347.               ANS$ = ""
  3348.               CALL GETANS ("Are you sure? Y/N", "YN", ANS$, 100, 100,
  3349.               240, 11)
  3350.               ( Above must be on one line. )
  3351.  
  3352.               A window will be generated with the text "Are you sure?
  3353.               Y/N"  printed in it.  With TR% and LC% set to 100 the
  3354.               window will be centered on the screen ( See MAKEWIND ).
  3355.               ATTR% = 240, therefore, the window will be white with
  3356.               black text and a black flashing border. The user may
  3357.               press the N, n, Y, y, or ESC keys to exit.  The key
  3358.               pressed will be returned to GETANS in the argument ANS$.
  3359.  
  3360.  
  3361.  
  3362.                                        48
  3363.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.  
  3371.  
  3372.  
  3373.                          ***** INPUT ROUTINES *****
  3374.  
  3375.          Input routines provide the ability to generate a single input
  3376.          field ( INPTWIND ), or multiple input fields ( MULTINPT ).
  3377.          Full editing is provided within each field.  Up to 10 multiple
  3378.          input screens may be used, with each screen capable of
  3379.          supporting up to 150 fields. Fields may be defined as numeric,
  3380.          alpha/numeric, or date. Numeric fields may be designated 0 to 6
  3381.          decimal places and optionally padded with leading zeros.
  3382.          Numerous additional options are available.
  3383.  
  3384.  
  3385.          5.00 INPTINIT ( DATEFORMAT%, ISDOT%, INPUTEXIT$ )
  3386.               See: Example - Input window
  3387.  
  3388.               Description: Initialization routine for input routines
  3389.               INPTWIND and MULTINPT.  INPTINIT MUST BE CALLED ONCE IN
  3390.               EVERY PROGRAM BEFORE ANY CALLS TO ROUTINES INPTWIND AND
  3391.               MULTINPT.
  3392.  
  3393.               NOTE: IF A CLEAR STATEMENT IS EXECUTED BY THE PROGRAM
  3394.               INPUT INITIALIZATION MEMORY IS LOST.  INPTINIT MUST BE
  3395.               CALLED AFTER A CLEAR STATEMENT TO RE-INITIALIZE INPUT
  3396.               INITIALIZATION MEMORY.
  3397.  
  3398.               Arguments:   DATEFORMAT% sets the valid date format for
  3399.               input routines INPTWIND and MULTINPT.  If a field in
  3400.               either input routine is designated a date field, the field
  3401.               can not be exited if the entered date does not match the
  3402.               date format as specified by DATEFORMAT%.  The valid date
  3403.               format varies predicated on the specified field width for
  3404.               the date field.  If set outside it's allowable range,
  3405.               DATEFORMAT% defaults to 1.  Listed are valid values for
  3406.               DATEFORMAT% and the corresponding valid date formats.
  3407.  
  3408.               DATEFORMAT%    DATE FORMAT            DATE FORMAT
  3409.                           (FIELD WIDTH = 10)     (FIELD WIDTH = 8)
  3410.  
  3411.                  1            MM-DD-YYYY             MM-DD-YY
  3412.                  2            MM/DD/YYYY             MM/DD/YY
  3413.                  3            DD-MM-YYYY             DD-MM-YY
  3414.                  4            DD/MM/YYYY             DD/MM/YY
  3415.                  5            DD.MM.YYYY             DD.MM.YY
  3416.  
  3417.                            ISDOT% sets a period or comma for the decimal
  3418.               designator.  If ISDOT% = 1 the decimal designator is a
  3419.               period.  If ISDOT% <> 1 the decimal designator is a comma.
  3420.               This is appropriate for some users outside of the USA.
  3421.  
  3422.                            INPUTEXIT$ set the keys which will exit input
  3423.               routine INPTWIND.  INPUTEXIT$ does not affect input
  3424.               routine MULTINPT.  Routine SETINPT is used to set exit
  3425.  
  3426.  
  3427.  
  3428.                                        49
  3429.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437.  
  3438.  
  3439.               keys for input routine MULTINPT.  If INPUTEXIT$ = "" the
  3440.               default keys will exit INPTWIND.  These are ESC and ENTER.
  3441.               ESC will exit INPTWIND returning the pre-edited text.
  3442.               ENTER exits INPTWIND returning the edited text.  Using
  3443.               INPUTEXIT$ allows key trapping while in the INPTWIND
  3444.               environment.  INPUTEXIT$ may consist of any combination of
  3445.               the following characters.
  3446.  
  3447.               Character                                "Exit" key.
  3448.  
  3449.               "0"                                      F10
  3450.               "1","2","3","4","5","6","7","8","9"      F1 to F9
  3451.               "E"                                      ESC
  3452.               "R"                                      RETURN (ENTER)
  3453.               "U"                                      PGUP
  3454.               "D"                                      PGDN
  3455.  
  3456.               Example: If INPUTEXIT$ = "02ER" the F10, F2, ESC, and
  3457.               RETURN (ENTER) keys will exit INPTWIND.  see the
  3458.               description for routine INPTWIND ( argument RKEY% ).
  3459.  
  3460.               NOTE: IF THE ESC KEY IS NOT AN EXIT KEY AND INPUTEXIT$
  3461.               DOES NOT EQUAL "" THE ESC KEY WILL RETURN THE TEXT IN THE
  3462.               INPUT FIELD TO IT'S PRE-EDITED STATE. INPTWIND WILL NOT BE
  3463.               EXITED.  IF THE ESC KEY IS AN EXIT KEY INPTWIND IS EXITED
  3464.               RETURNING THE EDITED TEXT, WHEN ESC IS PRESSED.
  3465.  
  3466.  
  3467.          5.01 INPTWIND (P$,CODE$,TR%,LC%,WD%,ATTR%,RES$,RTRN$,RKEY%,BRDR%)
  3468.               See: Example - Input window
  3469.  
  3470.               NOTE1: ROUTINES INPTINIT AND SETWIND MUST BE CALLED AT LEAST
  3471.               ONCE IN ANY PROGRAM PRIOR TO CALLING THIS ROUTINE.
  3472.  
  3473.               NOTE2: WHEN AN INPUT WINDOW ( OR LINE ) IS MADE IT BECOMES
  3474.               THE ACTIVE INPUT WINDOW UNTIL IT IS DEACTIVATED BY A CALL
  3475.               TO ROUTINE RSTRINPT.  ON ENTRY THIS ROUTINE WILL MAKE A
  3476.               NEW INPUT WINDOW IF THERE IS NO ACTIVE INPUT WINDOW.  IF
  3477.               THERE IS AN ACTIVE INPUT WINDOW THIS ROUTINE SIMPLY RE-
  3478.               ENTERS IT.  A NEW INPUT WINDOW IS NOT MADE.  AN
  3479.               UNDERSTANDING OF ROUTINE RSTRINPT IS NECESSARY TO FULLY
  3480.               UNDERSTAND THIS ROUTINE.
  3481.  
  3482.  
  3483.               Description: On entry this routine will do one of the
  3484.               following.
  3485.  
  3486.               1. IF THERE IS NO ACTIVE INPUT WINDOW this routine makes
  3487.                  an input field, which may optionally be windowed. The
  3488.                  area under the field or window is automatically saved.
  3489.                  The input window becomes the active input window.
  3490.                  The area under the window ( or line ) can be restored
  3491.  
  3492.  
  3493.  
  3494.                                        50
  3495.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.  
  3503.  
  3504.  
  3505.                  after exiting INPTWIND by calling routine RSTRINPT.
  3506.                  RSTRINPT also deactivates the active input window.
  3507.  
  3508.               2. IF THERE IS AN ACTIVE INPUT WINDOW calling INPTWIND re-
  3509.                  enters it.  Arguments for top row (TR%), left column
  3510.                  (LC%), field width (WD%) and color (ATTR%) are ignored.
  3511.                  A new input window is NOT made.  The active input
  3512.                  window ( from a previous call to INPTWIND ) is used and
  3513.                  MUST be intact.  The following outlines the suggested
  3514.                  use for routines INPTWIND and RSTRINPT.
  3515.  
  3516.                  A.  Call INPTWIND.  Enter data and exit.
  3517.  
  3518.                  B.  Check the data.
  3519.  
  3520.                  C.  If the data is good proceed to step D.  If the data
  3521.                      is not good go back to step A.  As RSTRINPT has not
  3522.                      been called the input window is still active.  A
  3523.                      new input window will not be made.  The existing
  3524.                      active input window is simply re-entered.
  3525.  
  3526.                  D.  Call RSTRINPT.  The active input window made in
  3527.                      step A is deactivated by RSTRINPT.  The display
  3528.                      area covered by the input window may optionally be
  3529.                      restored.  The next call to INPTWIND will make a
  3530.                      new input window as an active input window will not
  3531.                      exist.
  3532.  
  3533.               IF AN ACTIVE INPUT WINDOW UNKNOWINGLY EXISTS ON ENTRY TO
  3534.               INPTWIND THE ACTIVE INPUT FIELD WILL BE DISPLAYED.  THE
  3535.               INPUT WINDOW WILL NOT BE DISPLAYED.  THE LOCATION OF THE
  3536.               FIELD WILL BE THE LOCATION SET BY THE ACTIVE INPUT WINDOW.
  3537.               THE COORDINATES IN THE CALL TO INPTWIND ARE IGNORED.  IF
  3538.               AN INPUT FIELD IS PLACED AT AN UNEXPECTED SCREEN LOCATION
  3539.               ON A CALL TO INPTWIND AN ACTIVE INPUT WINDOW PROBABLY
  3540.               EXISTS WHEN IT IS NOT EXPECTED TO EXIST.
  3541.  
  3542.               Arguments:   P$ is the message ( prompt ) which will be
  3543.               printed to the left of the input field or in the title
  3544.               box of the window, if one is specified.  If P$ is
  3545.               preceded by a "@" it will be centered in the title box.
  3546.  
  3547.                            CODE$ sets the type of input field and may
  3548.               equal the following.
  3549.  
  3550.               "A"  ------   Alpha/numeric.  All standard keys are active.
  3551.               "U"  ------   Alpha/numeric.  Upper case.
  3552.               "L"  ------   Alpha/numeric.  Lower case.
  3553.  
  3554.               "D"  ------   Date.  If a field is a date field it can not
  3555.                             be exited unless the date is valid or the
  3556.                             field is blank.  The number keys are active.
  3557.  
  3558.  
  3559.  
  3560.                                        51
  3561.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.  
  3569.  
  3570.  
  3571.                             Depending on the date format specified in
  3572.                             the call to INPTINPT, the ".", "/" or "-"
  3573.                             key will be active also.  Valid dates range
  3574.                             from 01/01/1901 to 12/31/2099 if the width
  3575.                             of the date field is 10, or 01/01/01 to
  3576.                             12/31/99 if the width of the date field is
  3577.                             8.  SEE DESCRIPTION FOR DATEFORMAT% IN
  3578.                             ROUTINE "INPTINIT".
  3579.  
  3580.               "P0" or "0" - Numeric. The value of the string desig-
  3581.               "P1" or "1"   nates the number of decimal places that
  3582.               "P2" or "2"   will be returned, even if more are
  3583.               "P3" or "3"   entered.   The field can not be exited
  3584.               "P4" or "4"   unless the number, with the correct
  3585.               "P5" or "5"   number of decimal places will fit in the
  3586.               "P6" or "6"   the field. or the field is blank.  The
  3587.                             numeric,"-", and "." keys are active. The
  3588.                             minus sign will only print in the first
  3589.                             position of the field.  If a decimal point
  3590.                             is in the field another one can not be
  3591.                             entered until the previous one is deleted.
  3592.  
  3593.               NOTE: A NUMERIC FIELD WILL BE PADDED WITH LEADING ZEROS
  3594.               IF CODE$ CONTAINS A "P."
  3595.  
  3596.               EXAMPLE:  CODE$ = "3P" --- This allows numeric input.  It
  3597.               will return the data expanded, or truncated to, 3 digits
  3598.               after the decimal point and padded with leading zeros.
  3599.  
  3600.                            TR% is the top row of the field or window.
  3601.               If a window is designated, TR% must equal 1 to 23.
  3602.               Without a window  TR% must equal 1 to 25.  Setting TR%
  3603.               to 100 centers the field, or window, top to bottom.
  3604.  
  3605.                            LC% is the left column.  If a window is
  3606.               designated, LC% must equal 1 to 76 ( 36 in 40 column
  3607.               mode ). With no window LC% must equal 1 to 79 ( 39 in
  3608.               40 column mode ). If LC% = 100  the field, or window, is
  3609.               centered left to right.  If LC% is set so the input
  3610.               field with a window, if specified, or with a prompt, if
  3611.               specified, will not fit on the screen an error will be
  3612.               reported.
  3613.  
  3614.                            WD% is the field's width.  A date field must
  3615.               have WD%=10 or WD%=8.  A numeric field requires WD% to
  3616.               be from the number of ( decimal places + 1 ) to 15.
  3617.               For an alpha/numeric field WD% can range from 1 to the
  3618.               screen width minus 1 ( minus 4 if windowed ).
  3619.  
  3620.                            ATTR% is the window's and prompt's color.
  3621.               The color of the input field is the inverse of the
  3622.               window's color.  The field's foreground color is the
  3623.  
  3624.  
  3625.  
  3626.                                        52
  3627.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.  
  3635.  
  3636.  
  3637.               same as the window's background color while the field's
  3638.               background has the same color as the windows foreground.
  3639.               SEE THE COLOR ATTRIBUTE CHART.  To make the field's
  3640.               foreground color high intensity, add 1000 to ATTR%.
  3641.  
  3642.               EXAMPLE:  ATTR% = 1160.  ( 1000 + 160 ) The "160"
  3643.               produces a flashing black on green window.  ( SEE THE
  3644.               COLOR ATTRIBUTE CHART. ).  The "1000" makes the field
  3645.               text high intensity green.
  3646.  
  3647.                            RES$ is the restrict string. It holds the
  3648.               allowable characters which can be entered in the input
  3649.               field.  RES$ IS IGNORED IF CODE$ IS NOT ALPHA/NUMERIC
  3650.               ("A").  IF CODE$ IS ALPHA/NUMERIC ("A") AND RES$ = ""
  3651.               ALL STANDARD ALPHA/NUMERIC KEYS ARE ALLOWABLE. (SEE
  3652.               SETINPT IN SECTION 5.03 FOR DETAILS.)
  3653.  
  3654.                            RTRN$ is the string passed to, and returned
  3655.               from the input field.  A numeric string can be converted
  3656.               to a number by using the VAL function.
  3657.  
  3658.               EXAMPLE:  IF RTRN$= "123.123" IT CAN BE CONVERTED TO A
  3659.               NUMBER (A) WITH THE STATEMENT:
  3660.  
  3661.                            A = VAL(RTRN$)
  3662.                            A now equals 123.123
  3663.  
  3664.                            RKEY% is returned by INPTWIND.  RKEY%
  3665.               represents the key used to exit INPTWIND and is restricted
  3666.               to those keys specified in the call to INPTINIT ( argument
  3667.               INPUTEXIT$ ).  RKEY% may equal the following
  3668.  
  3669.               RKEY%                     KEY WHICH EXITED INPTWIND
  3670.  
  3671.               1 to 10                   F1 to F10
  3672.               11                        PGUP
  3673.               12                        PGDN
  3674.               13                        ENTER ( RETURN )
  3675.               27                        ESC
  3676.  
  3677.  
  3678.                            BRDR% is the input window's border. ( SEE
  3679.               THE BORDER DESIGNATION CHART ). If BRDR% = 0 a single
  3680.               line input field ( no window ) is generated.  If BRDR%
  3681.               produces a title box window, the prompt (P$) is printed
  3682.               in the title box.
  3683.  
  3684.  
  3685.          5.02 RSTRINPT ( RESTOREFLAG% )
  3686.               See: Example - Input window
  3687.  
  3688.               Description: Used to deactivate the active input window
  3689.  
  3690.  
  3691.  
  3692.                                        53
  3693.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702.  
  3703.               generated by a call to routine INPTWIND.  Optionally
  3704.               restores the display area under the input window.  After a
  3705.               call to INPTWIND an active input window exists.
  3706.               Subsequent calls to INPTWIND behave differently if, on
  3707.               entry, an active input window exists.
  3708.  
  3709.               Argument:    RESTOREFLAG% must equal 1 to restore the
  3710.               display area ( saved by routine INPTWIND ) under the
  3711.               active input window.  If RESTOREFLAG% equals 0 the
  3712.               area under the active input window is not restored to the
  3713.               display.  REGARDLESS OF THE VALUE OF RESTOREFLAG% ALL
  3714.               CALLS TO RSTRINPT DEACTIVATE THE ACTIVE INPUT WINDOW.
  3715.  
  3716.               EXAMPLES:
  3717.  
  3718.               1. CALL RSTRINPT (1)  'DEACTIVATES ACTIVE INPUT WINDOW
  3719.                                     'AND RESTORES DISPLAY AREA UNDER IT.
  3720.  
  3721.               2. CALL RSTRINPT (0)  'DEACTIVATES ACTIVE INPUT WINDOW.
  3722.  
  3723.               NOTE1: IF AN INPUT WINDOW REMAINS ON THE DISPLAY AND IT IS
  3724.               NOT THE ACTIVE INPUT WINDOW, RSTRINPT CAN NOT RESTORE THE
  3725.               DISPLAY AREA UNDER IT.  RSTRINPT CAN ONLY RESTORE THE
  3726.               DISPLAY AREA UNDER THE ACTIVE INPUT WINDOW.
  3727.  
  3728.               NOTE2: THE ACTIVE INPUT WINDOW ( THE SAVED DISPLAY AREA )
  3729.               RESIDES IN WINDOW NUMBER 21.  FUNCTION WAVAIL% CAN
  3730.               DETERMINE IF AN INPUT WINDOW IS ACTIVE.
  3731.  
  3732.               EXAMPLE: IF WAVAIL%(21) = 0 ' An input window is active.
  3733.                        IF WAVAIL%(21) = 1 ' An input window is not
  3734.                                           ' active.
  3735.  
  3736.  
  3737.  
  3738.  
  3739.  
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.                                        54
  3759.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.          -----------------------------------------------------------------
  3770.          ' SAMPLE: Input window
  3771.          ' IT IS ASSUMED ROUTINE SETWIND HAS BEEN CALLED.
  3772.          ' BEFORE ANY CALLS TO INPTWIND, INPTINIT MUST BE CALLED.
  3773.  
  3774.          ' DATE FORMAT = "MM-DD-YYYY" OR "MM-DD-YY"
  3775.          ' DECIMAL DESIGNATOR IS A "."
  3776.          ' RETURN (ENTER) OR ESC WILL EXIT INPTWIND.
  3777.          CALL INPTINIT ( 1, 1, "" )
  3778.  
  3779.          '
  3780.          '
  3781.          GETINPUT:
  3782.          ' NUMERIC INPUT - 0 DECIMAL PLACES.
  3783.          ' INPUT WINDOW CENTERED ROW AND COLUMN.
  3784.          ' FIELD WIDTH = 2.
  3785.          ' HIGH INTENSITY WHITE ON BLACK.
  3786.          ' WINDOWED WITHOUT A TITLE BOX - PROMPT TO LEFT OF INPUT FIELD.
  3787.          ' THE FOLLOWING CALL TO INPTWIND MUST BE ON ONE LINE IN THE QB/QBX
  3788.          ' EDITOR.
  3789.          CALL INPTWIND ("Enter a number 1 to 50: ", "0", 100, 100, 2, 15,
  3790.                          "", RTRN$, RKEY%, 1 )
  3791.  
  3792.          ' RKEY% REPRESENTS KEY USED TO EXIT INPTWIND .
  3793.          ' RTRN$ IS THE ENTERED TEXT.
  3794.  
  3795.          IF RKEY% = 27 THEN PRINT "ESC PRESSED" :END    ' ESC EXITED
  3796.  
  3797.          R% = VAL(RTRN$)
  3798.  
  3799.          ' WAS BAD INPUT. GO BACK TO INPTWIND.  AS RSTRINPT HAS NOT BEEN
  3800.          ' CALLED THE INPUT WINDOW REMAINS ACTIVE.  IT WILL NOT BE RE-
  3801.          ' PRINTED. IT IS RE-ENTERED ONLY.
  3802.  
  3803.          IF R% < 1 OR R% > 50 THEN BEEP: GOTO GETINPUT  ' BAD INPUT
  3804.  
  3805.          ' WAS GOOD INPUT - RSTRINPT DEACTIVATES ACTIVE INPUT WINDOW AND
  3806.          ' RESTORES DISPLAY AREA UNDER SAME.
  3807.          ' *** IF RSTRINPT IS NOT CALLED, ON THE NEXT CALL TO INPTWIND AN
  3808.          ' *** ACTIVE INPUT WINDOW WILL STILL EXIST.  INPTWIND WILL IGNORE
  3809.          ' *** VALUES FOR TOP ROW, LEFT COLUMN, WIDTH AND COLOR AND USE THE
  3810.          ' *** VALUES FROM THE ACTIVE INPUT WINDOW.  FORGETTING TO CALL
  3811.          ' *** RSTRINPT TO DEACTIVATE AN ACTIVE INPUT WINDOW MAY THEREFOR
  3812.          ' *** PRODUCE UNEXPECTED RESULTS.
  3813.  
  3814.          CALL RSTRINPT (1)
  3815.          LOCATE 1, 1
  3816.          PRINT RTRN$ +" WAS ENTERED!"
  3817.          END
  3818.          -----------------------------------------------------------------
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.                                        55
  3825.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.          5.03 SETINPT ( SCRN%, COLWID%, EXIT$, INPT%(), INPT$(), ACTCOL% )
  3836.  
  3837.               Description: Defines a multi-field input screen, which may
  3838.               be utilized by a subsequent call to routine MULTINPT.
  3839.  
  3840.               Arguments:   SCRN% is the number or the screen being
  3841.               defined.  SCRN% may range from 1 to 10.
  3842.  
  3843.                            COLWID% is the column width of the screen
  3844.               and must equal 40 or 80.
  3845.  
  3846.                            EXIT$ is the code for keys which will
  3847.               exit the multi-field input routine for the designated
  3848.               screen number.  To make the function keys active place
  3849.               their number "1","2" etc in EXIT$.   A "0" represents
  3850.               the F10 key, a "D" the PGDN key , a "U" the PGUP key and
  3851.               an "E" the ESC key.
  3852.  
  3853.               EXAMPLE: IF EXIT$ ="03U" THE F10, F3, OR PGUP KEYS WILL
  3854.               EXIT THE MULTI-FIELD INPUT ROUTINE ( MULTINPT ).
  3855.  
  3856.               NOTE:  If the ESC key is not used as an exit key it is
  3857.               used to return the text in a field in MULTINPT to it's
  3858.               pre-edited state.  This feature is disabled when ESC is
  3859.               used as an exit key.   The SPACE BAR can also be an exit
  3860.               key for individual fields in MULTINPT if a field is a
  3861.               FIXED CHOICE field.   See the description for argument
  3862.               INPT%(), element CODE%, in this routine to use FIXED
  3863.               CHOICE fields.
  3864.  
  3865.                            INPT%() and INPT$() hold the data
  3866.               representing the parameters for each field in the multi-
  3867.               field input screen.  Starting at INPT%(1) and INPT$(1),
  3868.               the elements of INPT%() AND INPT$() are as follows;
  3869.  
  3870.                            ------------ INPT%() ---------- -INPT$()-
  3871.                             1      2    3    4     5    6    1
  3872.               (Field #1)   CODE%, TR%, LC%, WD%, ATTR%, 99, RES$
  3873.               (Field #2)   ...... Repeat above for each field
  3874.                            9999 ( signals end of INPT%()/INPT$() )
  3875.  
  3876.               INPT%(1)=CODE% FOR FIELD 1, INPT%(7)=CODE% FOR FIELD 2
  3877.               INPT$(1)=RES$ FOR FIELD 1, INPT$(2)=RES$ FOR FIELD 2
  3878.  
  3879.  
  3880.                            CODE% is the code for type of input field
  3881.               and can be set to any of the following.
  3882.  
  3883.               0 to 6 ----- The field is numeric with the indicated
  3884.               number of decimal places.
  3885.  
  3886.               10 to 16 --- The field is numeric with padded zeros.
  3887.  
  3888.  
  3889.  
  3890.                                        56
  3891.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.               Subtract 10 to obtain the number of decimal places.
  3902.  
  3903.               7 ---------- The field is alpha/numeric.
  3904.               8 ---------- The field is a date field.
  3905.               17 --------- The field is alpha/numeric. (upper case)
  3906.               27 --------- The field is alpha/numeric. (lower case)
  3907.  
  3908.               SEE ROUTINE "INPTWIND", ARGUMENT CODE$, FOR A DESCRIP-
  3909.               TION AND INPUT LIMITATIONS FOR FIELDS BASED ON THEIR
  3910.               DESIGNATION.
  3911.  
  3912.               Adding 100 to CODE% makes the field protected.  A
  3913.               protected field will be displayed but can not be
  3914.               edited.   A protected field can not be an Auto-advance
  3915.               or Auto-exit field.  If a protected field is defined as
  3916.               an Auto-exit or Auto-advance field the definition is
  3917.               ignored and the field remains a protected field.
  3918.  
  3919.               Adding 1000 to CODE% makes the field an Auto-advance
  3920.               field.  When the cursor reaches the end of an Auto-
  3921.               advance field, via typing a character, it moves to the
  3922.               next field.  ( User defined order. )
  3923.  
  3924.               Adding 10000 to CODE% makes the field an "Auto-exit
  3925.               always" field.   The multi-field input routine will be
  3926.               exited whenever the cursor is moved from an "Auto-exit
  3927.               always" field.
  3928.  
  3929.               Adding 20000 to CODE% makes the field an "Auto-exit on
  3930.               change" field.  The multi-field input routine will be
  3931.               exited only when the data in the field is changed and
  3932.               the cursor is moved from the field.  This is useful if a
  3933.               field is part of a formula to calculate another fields
  3934.               value.
  3935.  
  3936.               Adding 30000 to CODE% makes the field a "Fixed choice"
  3937.               field.  The multi-field input routine will be exited if
  3938.               the space bar is pressed or if the cursor is moved from
  3939.               a "fixed choice" field.   This also makes the field an
  3940.               auto-exit (always) field.  The description for the
  3941.               procedure MULTINPT describes the details of a "fixed
  3942.               choice" field.
  3943.  
  3944.               EXAMPLE: If CODE%= 21017 THEN CODE% = 20000+1000+17.
  3945.               THE FIELD IS ALPHA/NUMERIC ( UPPER CASE ), AUTO-ADVANCE
  3946.               AND "AUTO-EXIT ON CHANGE".
  3947.  
  3948.                ** SEE THE MULTI-FIELD CODE CHART IN THE APPENDIX.**
  3949.  
  3950.                            TR%, LC%, and WD% are the same as in
  3951.               INPTWIND.
  3952.  
  3953.  
  3954.  
  3955.  
  3956.                                        57
  3957.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.  
  3965.  
  3966.  
  3967.                            ATTR% is the fields color.
  3968.  
  3969.                            99 is a check and must follow the numeric
  3970.               data which defines each field.
  3971.  
  3972.                            RES$ defines the allowable characters
  3973.               in a restricted field.  If the field is not set to
  3974.               alpha/numeric by CODE%, RES$ is ignored.  Setting RES$ to
  3975.               "YN" and CODE% TO 17 ( UPPER CASE ) allows the field to
  3976.               respond to Y,y,N or n.  If CODE% = 7 ( UPPER AND LOWER
  3977.               CASE ) and RES$ ="YN" the field is restricted to Y or N.
  3978.               IF CODE%=27 ( LOWER CASE ) and RES$ ="YN" the field will
  3979.               not allow any characters.  If RES$ = "" the field is not
  3980.               restricted and will respond to characters predicated on
  3981.               the value of CODE%.
  3982.  
  3983.               NOTE: IT IS ONLY NECESSARY TO USE RES$ FOR NON-STANDARD
  3984.               FIELDS.  SET RES$ TO "" FOR NORMAL ALPHA/NUMERIC FIELDS
  3985.               OR THE RESULT WILL BE EXTRA CODE AND MEMORY USAGE.  IF
  3986.               THE FIELD IS STANDARD ALPHA/NUMERIC MAKE CODE% = 7 AND
  3987.               RES$ = "".  THIS WILL ALLOW UPPER/LOWER CASE ALPHA/NUM-
  3988.               ERIC INPUT.
  3989.  
  3990.                      EXAMPLE: RES$ = "0123456789-( )"
  3991.  
  3992.                      THIS RESTRICTS INPUT TO CHARACTERS INCLUDED IN
  3993.                      A PHONE NUMBER WITH THE AREA CODE.
  3994.  
  3995.                            ACTCOL% is the color attribute of the active
  3996.               input field.  Use ACTCOL% to make the active field a
  3997.               different color than the inactive fields.  If ACTCOL% = 0,
  3998.               ACTCOL% is ignored and the active field's color will not
  3999.               change.   ACTCOL% is adjusted to ACTCOL% MOD 128.
  4000.  
  4001.               -------------------------------------------------------
  4002.               'EXAMPLE OF A CALL TO SETINPT
  4003.  
  4004.               A% = 20: B% = 3            ' SET UP TEMPORARY ARRAYS FOR DATA.
  4005.               DIM INPT% (A%), INPT$(B%)  ' USE THIS METHOD SO ARRAY WILL BE
  4006.                                          ' DYNAMIC AND CAN BE DE-ALLOCATED
  4007.                                          ' LATER. DON'T USE DIM INPT%(20)
  4008.  
  4009.               FLD% = 1
  4010.               B% = 1                     ' ALWAYS START THE ARRAYS AT 1
  4011.               DO                         ' OR THE FIRST FIELD WILL BE
  4012.                 READ INPT%(B%)           ' LOST.
  4013.                 IF INPT%(B%)=9999 THEN EXIT DO   ' 9999 MARKS THE END
  4014.                 B% = B% + 1
  4015.  
  4016.                 FOR X% = 1 TO 5
  4017.                   READ INPT%(B%)         ' READ REMAINING NUMERIC DATA
  4018.                   B% =B% + 1             ' IN INPT%().  TR%,LC%,WD%
  4019.  
  4020.  
  4021.  
  4022.                                        58
  4023.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031.  
  4032.  
  4033.                 NEXT                     ' ATTR% AND THE CHECK (99).
  4034.                 READ INPT$(FLD%)         ' THEN READ INPT$() DATA FOR
  4035.                 FLD% = FLD% + 1          ' RESTRICTED FIELDS.
  4036.               LOOP
  4037.  
  4038.               DATA 0,1,1,15,112,99,""
  4039.               ' NUMERIC - TR%=1, LC%=1, WD%=15, ATTR%=112, CHECK MUST=99
  4040.               ' NOT RESTRICTED. THIS IS FIELD #1 (1st DATA STATEMENT)
  4041.  
  4042.               DATA 17,3,1,1,112,99,"YN"
  4043.               ' ALPHA/NUM ( UPPER CASE ) TR%=3, LC%=1, WD%=1, ATTR%=112
  4044.               ' CHECK MUST=99, RESTRICTED TO Y,N,y,or n.
  4045.               ' THIS FIELD #2 (2nd DATA STATEMENT)
  4046.  
  4047.               DATA 108,5,1,10,32,99,""
  4048.               ' PROTECTED DATE - TR%=5, LC%=1 WD%=10, ATTR%=32
  4049.               ' CHECK MUST = 99', NOT RESTRICTED
  4050.               ' THIS IS FIELD #3 (3rd DATA STATEMENT)
  4051.  
  4052.               DATA 9999
  4053.               ' 9999 MARKS THE END
  4054.  
  4055.  
  4056.               CALL SETINPT( 1, 80, "12", INPT%(), INPT$(), 15 )
  4057.  
  4058.               ERASE INPT%, INPT$       ' GET THE MEMORY BACK
  4059.  
  4060.               '------------------------------------------------------
  4061.               ' THE MULTI-FIELD INPUT SCREEN (#1) IS 80 COLUMNS WIDE
  4062.               ' AND WILL BE EXITED IF THE F1 OR F2 KEYS ARE PRESSED.
  4063.               ' THERE ARE 3 FIELDS AS PER THE DATA STATEMENTS. A CALL
  4064.               ' TO MULTINPT WILL DISPLAY THE FIELDS AND WAIT FOR
  4065.               ' INPUT. INPUT ENDS WHEN THE F1 OR F2 KEYS ARE PRESSED.
  4066.               ' THE ACTIVE FIELD WILL BE HIGH INTENSITY WHITE ON BLACK.
  4067.               '-------------------------------------------------------
  4068.  
  4069.          5.04 MULTINPT ( SCRN%, TOFLD%, CODE$, AUTOEXIT%, RKEY%, RTRN$() )
  4070.  
  4071.               NOTE1: ROUTINES INPTINIT AND SETWIND MUST BE CALLED AT LEAST
  4072.               ONCE IN ANY PROGRAM PRIOR TO CALLING THIS ROUTINE.
  4073.  
  4074.               Description: Displays input fields defined in a previous
  4075.               call to SETINPT.  Fields are available for full editing
  4076.               Returns edited strings to the calling program.
  4077.  
  4078.               Arguments:   SCRN% is the number ( 1 to 10 ) of the
  4079.               multi-field input screen to display.
  4080.  
  4081.                            TOFLD% serves two purposes.
  4082.  
  4083.               1. When entering MULTINPT, TOFLD% determines which field
  4084.                  will be the active field ( the one with the cursor ).
  4085.  
  4086.  
  4087.  
  4088.                                        59
  4089.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.                  It may range from one to the last field as designated
  4100.                  by SETINPT.
  4101.  
  4102.               2. When exiting MULTINPT, TOFLD% points to the next field
  4103.                  the cursor would normally occupy.  If a field is auto-
  4104.                  exit ( always ) and the down arrow is pressed, MULTINPT
  4105.                  will be exited.  TOFLD% will point to the field the
  4106.                  cursor would normally occupy via the down arrow being
  4107.                  pressed.  This enables MULTINPT to be exited by an
  4108.                  auto-exit field and re-entered at the correct field.
  4109.                  If the field is a fixed choice field and the space bar
  4110.                  is pressed, TOFLD% will point to the fixed choice field
  4111.                  This is the field the cursor occupied before MULTINPT
  4112.                  was exited.
  4113.  
  4114.                            CODE$ specifies properties of the multi-field
  4115.               input screen.  CODE$ may equal the following.
  4116.  
  4117.               "VIEW"  ------ On entry MULTINPT will fill a single field
  4118.                              or all fields with their respective data.
  4119.                              MULTINPT is then exited.  This is useful
  4120.                              for viewing a multi-field screen or
  4121.                              updating a single field  ( see argument
  4122.                              AUTOEXIT% ).
  4123.  
  4124.               "U" ---------- This changes the normal field to field
  4125.                              movement of the cursor when using the TAB,
  4126.                              SHIFT TAB, RIGHT ARROW, AND LEFT ARROW
  4127.                              keys to user defined order.  User defined
  4128.                              order is the same order as fields are
  4129.                              defined in routine SETINPT. The TAB and
  4130.                              RIGHT ARROW keys follow user defined order
  4131.                              ( same as ENTER or DOWN ARROW ).  The SHIFT
  4132.                              TAB and LEFT ARROW keys follow reverse user
  4133.                              defined order ( same as UP ARROW ).
  4134.  
  4135.                   ---------- All other string values for CODE$ have no
  4136.                              effect on the multi-field input screen.
  4137.  
  4138.                            AUTOEXIT% also serves two purposes.
  4139.  
  4140.               1. If AUTOEXIT% is set to zero, MULTINPT, when entered,
  4141.                  will update all fields.  If AUTOEXIT% is set from one
  4142.                  to the last field number only the specified field is
  4143.                  updated.  This allows quick exiting from, and re-
  4144.                  entering of MULTINPT.
  4145.  
  4146.               2. When MULTINPT is exited AUTOEXIT% will be set to zero
  4147.                  or an auto-exit field number ( the active field prior
  4148.                  to the exit ).  It is important to distinguish this
  4149.                  from argument TOFLD% which points to the NEXT field the
  4150.                  cursor would normally occupy.
  4151.  
  4152.  
  4153.  
  4154.                                        60
  4155.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.  
  4163.  
  4164.  
  4165.                  The following conditions will set AUTOEXIT% to zero on
  4166.                  exit.
  4167.  
  4168.                  - The field occupied by the cursor, on exit, was NOT an
  4169.                    auto-exit field.
  4170.  
  4171.                  - The field occupied by the cursor, on exit, was an
  4172.                    auto-exit, on change, field and the field's text was
  4173.                    not changed.
  4174.  
  4175.                  The following conditions will set AUTOEXIT% to an auto-
  4176.                  exit field number on exit.
  4177.  
  4178.                  - The field the cursor occupied, on exit, was an auto-
  4179.                    exit ( always ) field.
  4180.  
  4181.                  - The field the cursor occupied, on exit, was an auto-
  4182.                    exit ( on change ) field and the field's text was
  4183.                    changed.
  4184.  
  4185.                  - The field the cursor occupied, on exit, was a fixed
  4186.                    choice field.  Fixed choice fields are ALWAYS auto-
  4187.                    exit fields.  To determine if a fixed choice field
  4188.                    was exited via the space bar check argument RKEY% for
  4189.                    a value of 32.
  4190.  
  4191.               Use AUTOEXIT% to determine if data entered in an auto-exit
  4192.               field is valid or to use an auto-exit field's data as part
  4193.               of a calculation.
  4194.  
  4195.                             RKEY% returns a value designation for the
  4196.               key or feature which caused MULTINPT to be exited or auto-
  4197.               exited.  MULTINPT exits when a valid exit key (specified
  4198.               in the call to SETINPT for the multi-field input screen)
  4199.               is pressed.  MULTINPT is auto-exited whenever the cursor
  4200.               is moved out of an auto-exit ( always ) field, fixed
  4201.               choice, or auto-exit ( on change ) field and the field's
  4202.               text was changed.  MULTINPT is also auto-exited when the
  4203.               SPACE BAR is pressed with the cursor in a fixed choice
  4204.               field.  RKEY% may equal:
  4205.  
  4206.               1 to 10  Exit keys, F1 to F10, caused MULTINPT to be
  4207.                        exited.  MULTINPT was not exited by the auto-exit
  4208.                        feature although the field the cursor occupied on
  4209.                        exit may have been an auto-exit field.
  4210.  
  4211.               11 ----- Exit key, PGUP, caused MULTINPT to be exited.
  4212.                        MULTINPT was not exited by the auto-exit feature
  4213.                        although the field the cursor occupied on exit
  4214.                        may have been an auto-exit field.
  4215.  
  4216.  
  4217.  
  4218.  
  4219.  
  4220.                                        61
  4221.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.               12 ----- Exit key, PGDN, caused MULTINPT to be exited.
  4232.                        MULTINPT was not exited by the auto-exit feature
  4233.                        although the field the cursor occupied on exit
  4234.                        may have been an auto-exit field.
  4235.  
  4236.               13 ----- The RETURN key caused MULTINPT to be auto-exited.
  4237.                        The field must have been an auto-exit field.
  4238.  
  4239.               14 ----- SHIFT TAB or the LEFT ARROW caused MULTINPT to be
  4240.                        auto-exited.  The field must have been an
  4241.                        auto-exit field. IF ARGUMENT CODE$ = "U" ON ENTRY
  4242.                        TO MULTINPT THESE KEYS EXIT WITH RKEY% EQUAL TO
  4243.                        16.
  4244.  
  4245.               15 ----- The TAB key or RIGHT ARROW caused MULTINPT to be
  4246.                        auto-exited.  The field must have been an auto-
  4247.                        exit field. IF ARGUMENT CODE$ = "U" ON ENTRY TO
  4248.                        MULTINPT THESE KEYS EXIT WITH RKEY% EQUAL TO 13.
  4249.  
  4250.               16 ----- The UP ARROW caused MULTINPT to be auto-exited.
  4251.                        The field must have been an auto-exit field.
  4252.  
  4253.               17 ----- The CONTROL-HOME combination caused MULTINPT to
  4254.                        be auto-exited.  The field must have been an
  4255.                        auto-exit field.
  4256.  
  4257.               18 ----- The CONTROL-END combination caused MULTINPT to be
  4258.                        auto-exited.  The field must have been an auto-
  4259.                        exit field.
  4260.  
  4261.               19 ----- The DOWN ARROW caused MULTINPT to be auto-exited.
  4262.                        The field must have been an auto-exit field.
  4263.  
  4264.               20 ----- The AUTO-ADVANCE feature caused MULTINPT to be
  4265.                        auto-exited.  The field must also be an auto-exit
  4266.                        field.  This occurs when the text fills a auto-
  4267.                        advance, auto-exit, field.
  4268.  
  4269.               27 ----- Exit key, ESC, caused MULTINPT to be exited.
  4270.                        MULTINPT was not exited by the auto-exit feature
  4271.                        although field the cursor occupied on exit may
  4272.                        have been an auto-exit field.
  4273.  
  4274.               32 ----- The SPACE BAR caused MULTINPT to be auto-exited.
  4275.                        The field occupied by the cursor on exit must have
  4276.                        been a fixed choice field which is always an auto-
  4277.                        exit field.
  4278.  
  4279.                            RTRN$() is a string array which holds the
  4280.               data to be edited.  Elements of RTRN$() will be
  4281.               displayed in the appropriate fields.  RTRN$(1) will be
  4282.               displayed in field 1 and so on.  Make sure there is not
  4283.  
  4284.  
  4285.  
  4286.                                        62
  4287.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.               a RTRN$(0) as it will not be displayed.  If a field is
  4298.               numeric, the number to be placed in it must be converted
  4299.               to a string.  Convert the number (A) to a string as
  4300.               follows:   RTRN$(2) = STR$(A)
  4301.  
  4302.               When MULTINPT is exited RTRN$() holds the data in it's
  4303.               edited state.
  4304.  
  4305.               On entering MULTINPT, if the field is designated as
  4306.               alpha/numeric and the string will not fit in the field
  4307.               it will be truncated to fit.  If the field is numeric
  4308.               and a number formatted to the correct number of decimal
  4309.               places will not fit in the field, "*"'s will be printed.
  4310.               This will not pose a problem if RTRN$() is initialized
  4311.               via MULTINPT, as MULTINPT will not allow the user to
  4312.               input data longer than the field's width.  If a numeric
  4313.               field is entered with an alpha string the string will
  4314.               print in the field. It is the programmer's responsibility
  4315.               to assure numeric fields contain numeric strings.  IF
  4316.               A FIELD IS NUMERIC WITH 4 DECIMAL PLACES SETTING THE
  4317.               FIELD TO EQUAL "DOG", WILL RESULT IN DOG.0000 BEING
  4318.               DISPLAYED!
  4319.  
  4320.               Use caution if a field is a result of calculation, as
  4321.               the result may be in exponential format.  EXAMPLE:
  4322.  
  4323.                      A = 1       B = 14      C = A/B
  4324.  
  4325.               STR$(C) = "7.142857E-02".  If the field is numeric with
  4326.               four decimal places and set to equal STR$(C) it will
  4327.               print as 7.1428, and not as .0714.
  4328.  
  4329.               To following routine corrects numbers in expoential form
  4330.               for both large and small numbers.  A$ is the numeric
  4331.               string to be displayed in a field.
  4332.  
  4333.               IF INSTR(3, A$, "+") THEN A$ = "9999999999999999"
  4334.               REM: THE NUMBER WAS TOO LARGE ( EX: 2.2D+22 ).  SET TO
  4335.               REM: "9999999999999999" AND "*"'s WILL BE DISPLAYED.
  4336.  
  4337.               IF INSTR(3, A$, "-") THEN
  4338.                  A# = VAL(A$): A# = A# + SGN(A#): A$ = STR$(A#)
  4339.                  IF ABS(A#) > 1 THEN
  4340.                     A$ = MID$(A$, INSTR(A$, "."))
  4341.                     IF A# < 1 THEN A$ = "-" + A$
  4342.                  ELSE
  4343.                     A$="0"
  4344.                  END IF
  4345.               END IF
  4346.               REM: THE NUMBER WAS TOO SMALL. IF A$ = "3.33D-4",
  4347.               REM: A$ WILL NOW = ".000333"
  4348.  
  4349.  
  4350.  
  4351.  
  4352.                                        63
  4353.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363.        ---------------------------------------------------------------
  4364.              FIELD EDITING FEATURES FOR "MULTINPT" AND "INPTWIND"
  4365.                   ( * = AVAILABLE FOR "MULTINPT" ONLY. )
  4366.        ---------------------------------------------------------------
  4367.        KEY             FUNCTION
  4368.  
  4369.        SPACE BAR       ERASES FIELD - IF IT IS THE FIRST KEY PRESSED.
  4370.  
  4371.        *UP ARROW       MOVES THE CURSOR FROM FIELD TO FIELD AS DETER-
  4372.        *DOWN ARROW     MINED BY THE ORDER DEFINED IN "SETINPT."  THE
  4373.                        DOWN ARROW MOVES THE CURSOR IN ASCENDING FIELD
  4374.                        ORDER. THE UP ARROW MOVES IT IN DESCENDING
  4375.                        FIELD ORDER.  PROTECTED FIELDS ARE SKIPPED.
  4376.  
  4377.        *CTRL END       MOVES THE CURSOR TO THE FIRST OR LAST FIELD AS
  4378.        *CTRL HOME      DESIGNATED BY THE ORDER DEFINED IN "SETINPT".
  4379.  
  4380.        *TAB            MOVES THE CURSOR FROM FIELD TO FIELD HORIZONT-
  4381.        *SHIFT TAB      ALLY. TAB MOVES LEFT TO RIGHT, SHIFT TAB MOVES
  4382.                        RIGHT TO LEFT. PROTECTED FIELDS ARE SKIPPED.
  4383.  
  4384.        CTRL E          ERASES THE FIELD.
  4385.  
  4386.        ESC             RETURNS A FIELD TO IT'S PRE-EDITED STATE OR
  4387.                        EXITS "MULTINPT".  EXITS "INPTWIND" WITH PRE-
  4388.                        EDITED STRING.  ESC EXITS "MULTINPT" IF THE
  4389.                        ESC KEY WAS DESIGNATED AS AND EXIT KEY BY
  4390.                        "SETINPT" ( FIELD NOT RESTORED TO PRE-EDITED
  4391.                        STATE ).
  4392.  
  4393.        ENTER           EXITS "INPTWIND".  SAME AS DOWN ARROW FOR
  4394.        RETURN          "MULTINPT".
  4395.  
  4396.        END             MOVES THE CURSOR TO THE FIRST OR LAST POSITION
  4397.        HOME            OF TEXT WITHIN A FIELD.
  4398.  
  4399.        BACKSPACE       DELETES THE CHARACTER TO THE LEFT OF CURSOR.
  4400.  
  4401.        DELETE          DELETES THE CHARACTER UNDER THE CURSOR AND
  4402.                        SHIFTS CHARACTERS LEFT.
  4403.  
  4404.        INSERT          TOGGLES FROM INSERT TO OVERSTRIKE MODE. IF MODE
  4405.                        IS OVERSTRIKE THE CURSOR IS LARGE. INSERT MODE
  4406.                        IS THE DEFAULT EVERY TIME A FIELD IS ENTERED.
  4407.  
  4408.        RIGHT ARROW     MOVES THE CURSOR LEFT OR RIGHT.  ACTS THE SAME
  4409.        LEFT ARROW      AS TAB OR SHIFT TAB FOR "MULTINPT" IF THE
  4410.                        CURSOR IN POSITION 1 AND THE LEFT ARROW IS
  4411.                        PRESSED, OR THE CURSOR IS AT THE END OF THE
  4412.                        TEXT AND THE RIGHT ARROW IS PRESSED.
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.                                        64
  4419.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.                       *****  DIRECTORY ROUTINES *****
  4430.  
  4431.          Directory routines compliment features included with
  4432.          QuickBASIC and BASIC 7.+ ( PDS )..  Procedures to find the
  4433.          current disk,  current path, disk capacity, and disk space
  4434.          available are supplied with WINDOWS R-E-Z.  Also included are
  4435.          routines to find the directory of any disk or path.  In
  4436.          addition a file's size, date, time, and attributes can be
  4437.          found.
  4438.  
  4439.          6.00 GETDISK (DRIVE%)
  4440.  
  4441.               Description: Retrieves the default disk drive.
  4442.  
  4443.               Argument:    DRIVE% is the current drive.  DRIVE% = 1
  4444.               for drive A:, 2 for B:, 3 for C:, 4 for D:, etc.
  4445.  
  4446.  
  4447.          6.01 FINDPATH (PATH$)
  4448.  
  4449.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  4450.               ROUTINE.  SEE SECTION " MAKING A DIRECTORY SCROLL
  4451.               WINDOW"
  4452.  
  4453.               Description: Retrieves the current path ( directory ).
  4454.  
  4455.               Argument:    PATH$ is the path in the format:
  4456.  
  4457.                      DRIVE:\SUB-DIRECTORY\SUB-DIRECTORY....
  4458.  
  4459.               PATH$ always starts with the drive letter.
  4460.  
  4461.  
  4462.          6.02 SETDISK (DRIVE%, BADFLAG%)
  4463.  
  4464.               Description: Changes the default drive.
  4465.  
  4466.               Arguments:   DRIVE% is the drive designation.  DRIVE% =
  4467.               1 for drive A:, 2 for B:, 3 for C:, etc.
  4468.  
  4469.                            BADFLAG% = 1 if DRIVE% is less than 1 or
  4470.               greater than the number of logical drives.  BADFLAG% = 0
  4471.               if DRIVE% is in the range from 1 to the number of logical
  4472.               drives in the system.
  4473.  
  4474.               NOTE: A SYSTEM WITH A FLOPPY DRIVE FOR DRIVE A: AND A
  4475.               HARD DISK FOR DRIVE C: HAS 3 LOGICAL DRIVES.  THEREFORE,
  4476.               BADFLAG% WILL = 0 IF DRIVE% = 1 TO 3 EVEN THOUGH A
  4477.               PHYSICAL DRIVE B: DOES NOT EXIST.  ATTEMPTS TO ACCESS
  4478.               DRIVE B: MAY RESULT IN THE DOS MESSAGE. "Place a disk in
  4479.               drive B: and press any key" BEING DISPLAYED.
  4480.  
  4481.  
  4482.  
  4483.  
  4484.                                        65
  4485.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.  
  4493.  
  4494.  
  4495.          6.03 DISKSIZE (DRIVE%, SIZE&, FREE&)
  4496.  
  4497.               NOTE: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING THIS
  4498.               ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  4499.               WINDOW".
  4500.  
  4501.               Description: Retrieves disk space and disk free space.
  4502.  
  4503.               Arguments:   DRIVE% is the drive designation.  It
  4504.               follows the same rules as detailed in SETDISK.  The note
  4505.               for SETDISK applies.
  4506.  
  4507.                            SIZE& is the size in bytes of disk space.
  4508.  
  4509.                            FREE& is the size in bytes of free disk
  4510.               space.
  4511.  
  4512.               NOTE: THE ARGUMENTS FOR SIZE AND FREE SPACE ARE LONG
  4513.               INTEGERS.  ANY VARIABLE USED TO REPRESENT THEM MUST BE
  4514.               DESIGNATED AS A LONG INTEGER ( FOLLOWED BY A "&" SIGN )
  4515.               OR A PARAMETER MIS-MATCH WILL BE REPORTED.
  4516.  
  4517.  
  4518.          6.04 FINDDIR (PATH$, TYP$, FILE%)
  4519.  
  4520.               NOTE # 1: THE FOLLOWING MUST BE PLACED BEFORE ANY
  4521.               EXECUTABLE STATEMENTS IN ANY MODULE CALLING "FINDDIR"
  4522.  
  4523.                 TYPE DIREC
  4524.                    SIZE AS LONG
  4525.                    DATE AS STRING * 10
  4526.                    TIME AS STRING * 6
  4527.                    ATTR AS INTEGER
  4528.                 END TYPE
  4529.                 COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  4530.  
  4531.               NOTE # 2: ALWAYS TRAP FOR DISK ERRORS PRIOR TO CALLING
  4532.               THIS ROUTINE.  SEE SECTION " MAKING A SCROLL DIRECTORY
  4533.               WINDOW"
  4534.  
  4535.               Description:  Puts the directory listing of the
  4536.               specified path in an array, DIREC$().  If a long
  4537.               directory search is requested the files size, date, time
  4538.               and attributes are also placed in array, DIRINFO().  The
  4539.               arrays MUST be defined as explained above in NOTE # 1.
  4540.  
  4541.               Arguments:    PATH$ is the path for the directory
  4542.               listing search.  It must be in the same format as
  4543.               returned by the procedure FINDPATH.  It may be expanded
  4544.               to restrict the search.  Wildcards are permitted.
  4545.  
  4546.               EXAMPLE: IF PATH$ = "C:\TEST\*.BAS", THE SEARCH WILL
  4547.  
  4548.  
  4549.  
  4550.                                        66
  4551.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.  
  4559.  
  4560.  
  4561.               FIND FILES IN DRIVE C:, SUB-DIRECTORY "TEST", WITH THE
  4562.               EXTENSION ".BAS".
  4563.  
  4564.                             TYP$ restricts or expands the search to
  4565.               include files with specified attributes.  An "L" in TYP$
  4566.               tells FINDDIR to make a long directory search.  The
  4567.               file's size, date, time and attributes are found in a
  4568.               long directory search, in addition to the files name,
  4569.               TYP$ may contain any combination of the following:
  4570.  
  4571.                            A - files archive bit set
  4572.                            H - hidden files
  4573.                            S - system files
  4574.                            R - read only files
  4575.                            D - sub-directory listings
  4576.                            V - volume entry
  4577.                            O - no file attribute
  4578.                            L - long directory search - SEE ABOVE
  4579.  
  4580.               EXAMPLE:  IF TYP$ = "HS" ONLY HIDDEN AND SYSTEM FILES
  4581.               WILL BE FOUND.
  4582.  
  4583.                            FILE% is the number of files found.  FILE% =
  4584.               0 if no files were found.
  4585.  
  4586.               If files are found their names are placed in the array,
  4587.               DIREC$().  A long directory search places the file's
  4588.               size, date, time and attribute designation in
  4589.               DIRINFO().
  4590.  
  4591.               DIREC$(1) = The name of first file found.
  4592.               DIRINFO(1).SIZE = The size of the file.
  4593.               DIRINFO(1).DATE = The files creation or last update date.
  4594.               DIRINFO(1).TIME = The files creation or last update time.
  4595.               DIRINFO(1).ATTR = The files attribute designation.
  4596.  
  4597.               The following describes DIRINFO(1).ATTR;
  4598.  
  4599.               IF DIRINFO(1).ATTR AND 1 the file is a read only file.
  4600.               IF DIRINFO(1).ATTR AND 2 the file is a hidden file.
  4601.               IF DIRINFO(1).ATTR  AND 4 the file is a system file.
  4602.               IF DIRINFO(1).ATTR  AND 8 the entry is a volume entry.
  4603.               IF DIRINFO(1).ATTR  AND 16 the entry is a sub-directory.
  4604.               IF DIRINFO(1).ATTR  AND 32 the files archived bit is set.
  4605.               IF DIRINFO(1).ATTR  = 0 the file has no attribute.
  4606.  
  4607.               NOTE:  WHEN FINDDIR IS CALLED THE ARRAY, DIREC$() IS
  4608.               AUTOMATICALLY DIMENSIONED TO THE NUMBER OF FILES FOUND.
  4609.               THE ARRAY, DIRINFO() IS ALSO DIMENSIONED TO THE NUMBER
  4610.               OF FILES FOUND PROVIDING THE DIRECTORY SEARCH IS A LONG
  4611.               DIRECTORY SEARCH.  EACH FILE FOUND USES ABOUT 16 BYTES
  4612.               OF MEMORY PLUS AN ADDITIONAL 22 BYTES IF THE DIRECTORY
  4613.  
  4614.  
  4615.  
  4616.                                        67
  4617.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.  
  4625.  
  4626.  
  4627.               SEARCH IS LONG.  TO RECLAIM THE MEMORY ( AFTER USING THE
  4628.               INFORMATION RETURNED BY THE CALL TO FINDDIR ) THE ARRAYS
  4629.               MUST BE ERASED VIA THE STATEMENT:
  4630.  
  4631.                            ERASE DIREC$, DIRINFO
  4632.  
  4633.  
  4634.  
  4635.  
  4636.  
  4637.  
  4638.  
  4639.  
  4640.  
  4641.  
  4642.  
  4643.  
  4644.  
  4645.  
  4646.  
  4647.  
  4648.  
  4649.  
  4650.  
  4651.  
  4652.  
  4653.  
  4654.  
  4655.  
  4656.  
  4657.  
  4658.  
  4659.  
  4660.  
  4661.  
  4662.  
  4663.  
  4664.  
  4665.  
  4666.  
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.                                        68
  4683.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.                    ***** MAKING A DIRECTORY SCROLL WINDOW *****
  4694.  
  4695.               REM: THIS EXAMPLE FINDS THE DIRECTORY LISTING OF ALL FILES
  4696.               REM: WITH THE ARCHIVE BIT SET IN DRIVE A.  IT PUTS THE LISTING
  4697.               REM: IN A SCROLL WINDOW AND WAITS FOR THE SELECTION OF A
  4698.               REM: FILE.
  4699.  
  4700.               TYPE DIREC                  ' REQUIRED IN ANY MODULE
  4701.                    SIZE AS LONG           ' USING DIRECTORY ROUTINES.
  4702.                    DATE AS STRING * 10
  4703.                    TIME AS STRING * 6
  4704.                    ATTR AS INTEGER
  4705.               END TYPE
  4706.               COMMON SHARED /DIRECTORY/ DIREC$(), DIRINFO() AS DIREC
  4707.               DIM DUMMY$ (0)                 ' FOR INFO-LINE (NOT USED)
  4708.               CALL SETWIND(1, 1, 7 )         ' INITIALIZE
  4709.  
  4710.               START:
  4711.               CLS
  4712.               ON ERROR GOTO DISKERROR    ' ALWAYS TRAP FOR DISK
  4713.                                          ' ERRORS.
  4714.  
  4715.               REM: AS TYP$ INCLUDES AN "A", THE  FOLLOWING CALL TO
  4716.               REM: FINDDIR PLACES FILES WITH THE ARCHIVE BIT SET FROM
  4717.               REM: DRIVE A:, ("A:\"), IN DIREC$().  AS TYP$ INCLUDES AN "L"
  4718.               REM: THE FILES SIZE, DATE, TIME AND ATTRIBUTES ARE PLACED IN
  4719.               REM: DIRINFO().  FILE% HOLDS THE NUMBER OF FILES FOUND.
  4720.  
  4721.               TYP$ ="AL"
  4722.               CALL FINDDIR ("A:\", TYP$, FILE%)
  4723.  
  4724.               IF FILE% > 0 THEN       ' ONLY IF FILES EXISTED.
  4725.  
  4726.                   REM: MAKE A WINDOW.  STATEMENT MUST BE ON 1 LINE
  4727.  
  4728.                   CALL MAKEWIND(1 ,"@Select file - Press ENTER",
  4729.                   100 ,100 ,30 ,10 ,15 ,101)
  4730.  
  4731.                   REM: MAKE IT AN AUTO-EXIT SCROLL WINDOW.
  4732.  
  4733.                   KIND$ ="A"                ' AUTO-EXIT FEATURE IS ON.
  4734.                   ' Following must be on one line.
  4735.                   CALL SCRLWIND(DIREC$(), DUMMY$(),"", FILE%, KIND$,
  4736.                                 RTRN%, 1, 1, RKEY%, 0)
  4737.  
  4738.                   IF RKEY%% <> 27 THEN
  4739.                       LOCATE 1,1
  4740.                       PRINT "FILE .......";DIREC$(RTRN%)
  4741.                       PRINT "SIZE........";DIRINFO(RTRN%).SIZE
  4742.                       PRINT "DATE........";DIRINFO(RTRN%).DATE
  4743.                       PRINT "TIME........";DIRINFO(RTRN%).TIME
  4744.                       PRINT "ATTRIBUTE...";DIRINFO(RTRN%).ATTR
  4745.  
  4746.  
  4747.  
  4748.                                        69
  4749.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.                       ERASE DIREC$, DIRINFO
  4760.                    END IF
  4761.  
  4762.                    CALL RSTRWIND(1,1)        ' REMOVE THE WINDOW
  4763.  
  4764.                    IF RTRN%= 0 THEN GOTO START 'ESC WAS PRESSED
  4765.               ELSE             ' FILE% = 0 ( NO FILES WERE FOUND )
  4766.                    PRINT "NO FILES WERE FOUND"
  4767.               END IF
  4768.               ON ERROR GOTO 0             ' TURN OFF ERROR DETECTION
  4769.  
  4770.               END
  4771.  
  4772.               DISKERROR:
  4773.  
  4774.               REM: ERR = ERROR NUMBER. THIS ERROR HANDLING ROUTINE
  4775.               REM: WILL DETECT IF DISK IS NOT READY, NOT AVAILABLE,
  4776.               REM: OR PATH WAS BAD.
  4777.               SELECT CASE ERR
  4778.                  CASE 71
  4779.                     E$ = "DISK NOT READY"
  4780.                  CASE 68
  4781.                     E$ = "DISK NOT AVAILABLE"
  4782.                  CASE 76
  4783.                     E$ = "PATH NOT FOUND"
  4784.                  CASE ELSE
  4785.                     E$ = "UN-IDENTIFIED DISK ERROR"
  4786.               END SELECT
  4787.  
  4788.               REM: FOLLOWING MUST BE ON ONE LINE
  4789.  
  4790.               CALL GETANS("DISK ERROR: " + E$ + " Press any key.."
  4791.               ,"", "",100 ,100, 143, 1)
  4792.  
  4793.               RESUME START
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.                                        70
  4815.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.  
  4823.  
  4824.  
  4825.                      ****  KEYBOARD AND MOUSE ROUTINES ****
  4826.  
  4827.          Adding the ability to "read the mouse" these routines provide
  4828.          increased flexibility over BASIC's INKEY$ statement.
  4829.  
  4830.          NOTE: THESE ARE ASSEMBLY ROUTINES.   ALWAYS PLACE THEM IN
  4831.                DECLARE STATEMENTS IN ANY MODULE WHICH USES THEM.  THIS
  4832.                WILL ASSURE ARGUMENT MATCHING AND PREVENT ACCIDENTAL
  4833.                PROGRAM "CRASHES".
  4834.  
  4835.          7.00 KEYMOUSE%
  4836.  
  4837.               Description: KEYMOUSE% is a function.  It pauses program
  4838.               execution.  Upon keyboard or mouse input the program
  4839.               resumes with the appropriate code returned in KEYMOUSE%.
  4840.               The mouse buttons are user definable via the procedure
  4841.               MBUTTONS.  Mouse movement emulates the arrow keys.  Up,
  4842.               down, left, and right mouse movement places the same
  4843.               value in KEYMOUSE% as the corresponding arrow key.  If
  4844.               the key or mouse button pressed produces a standard
  4845.               ASCII/IBM character, the code for the character ( 1 to
  4846.               255 ) is returned in KEYMOUSE%.   If the key pressed, or
  4847.               mouse movement, produces an extended scan code such as
  4848.               the up arrow, the extended scan code for the key
  4849.               multiplied by 256 is returned in KEYMOUSE%.  KEYMOUSE%
  4850.               returns  18432 ( 72 * 256 ) for the up arrow.  For those
  4851.               keys which produce an extended scan code over 127, such
  4852.               as CTRL-PGUP ( 129 ), KEYMOUSE% returns a negative
  4853.               value.  SEE THE KEYMOUSE CODE CHART IN THE APPENDIX.
  4854.  
  4855.               -------------------------------------------------------
  4856.               'EXAMPLE: WAITS FOR RETURN, "A", DOWN ARROW, OR END.
  4857.               'PRESS END TO END
  4858.                DECLARE FUNCTION KEYMOUSE%
  4859.  
  4860.               INPT:
  4861.               A% = KEYMOUSE%        ' PROGRAM WAITS FOR INPUT HERE
  4862.               SELECT CASE A%
  4863.                  CASE 13            ' 13 IS ASCII FOR THE RETURN KEY
  4864.                    PRINT "RETURN"
  4865.                  CASE 65            ' 65 IS ASCII FOR "A"
  4866.                    PRINT "A"
  4867.                  CASE 80 * 256          ' 80 IS THE EXTENDED SCAN
  4868.                    PRINT "DOWN ARROW"   ' CODE FOR THE DOWN ARROW.
  4869.                  CASE 79 * 256          ' 79 IS THE EXTENDED SCAN
  4870.                    PRINT "END"          ' FOR END.
  4871.                    END
  4872.                  CASE ELSE
  4873.                    GOTO INPT
  4874.               END SELECT
  4875.               GOTO INPT
  4876.               --------------------------------------------------------
  4877.  
  4878.  
  4879.  
  4880.                                        71
  4881.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.          7.01 MBUTTONS% ( LBUTTON%, RBUTTON%)
  4892.  
  4893.               NOTE: THIS ROUTINE MUST BE CALLED AT LEAST ONCE IN ANY
  4894.               PROGRAM BEFORE ATTEMPTING TO USE THE MOUSE.
  4895.  
  4896.               Description:  Sets the values which will be placed in
  4897.               function KEYMOUSE% for the left and right mouse buttons.
  4898.  
  4899.               Arguments: LBUTTON% sets the value which will be
  4900.               returned in function KEYMOUSE% when the left mouse button
  4901.               is pressed. It may range from 0 to 255.  If LBUTTON% is
  4902.               greater than 255 it is converted to LBUTTON% AND 255
  4903.  
  4904.                          RBUTTON% sets the value which will be
  4905.               returned in function KEYMOUSE% when the right mouse
  4906.               button is pressed. It may range from 0 to 255.  If
  4907.               RBUTTON% is greater than 255 it is converted to
  4908.               LBUTTON% and 255.
  4909.               --------------------------------------------------------
  4910.               ' EXAMPLE: SETS THE LEFT MOUSE BUTTON TO "RETURN" AND
  4911.               ' THE RIGHT MOUSE BUTTON TO "ESC". 13 IS THE ASCII CODE
  4912.               ' FOR "RETURN".  27 IS THE ASCII CODE FOR "ESC".
  4913.  
  4914.               DECLARE SUB MBUTTONS ( LBUTTON%, RBUTTON% )
  4915.  
  4916.               CALL MBUTTON ( 13, 27 )
  4917.               --------------------------------------------------------
  4918.  
  4919.          7.02 MOUSEON (ISON%)
  4920.  
  4921.               NOTE: THIS ROUTINE MUST BE CALLED AT LEAST ONCE IN ANY
  4922.               PROGRAM BEFORE ATTEMPTING TO USE THE MOUSE.
  4923.  
  4924.               Description: Sets the mouse status.
  4925.  
  4926.               Arguments: ISON% sets the mouse status as follows:
  4927.  
  4928.               If ISON% = 0 the mouse is off.
  4929.               If ISON% = 1 the mouse is on.
  4930.               If ISON% = 2 the mouse buttons remain active
  4931.               but mouse movement detection is disabled.
  4932.  
  4933.               Any other value for ISON% sets the mouse to on.
  4934.          -------------------------------------------------------------
  4935.  
  4936.          9.00 DOSOUND
  4937.  
  4938.               Description:  Makes the default sound ,or sound as
  4939.               specified by a previous call to SETWIND.
  4940.  
  4941.               Arguments:    None.
  4942.  
  4943.  
  4944.  
  4945.  
  4946.                                        72
  4947.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.  
  4957.                         **** INFO-LINE ROUTINES *****
  4958.  
  4959.          These routines allow the programmer to set up and print in an
  4960.          info-line at any location on the screen.  The info-line can be
  4961.          used to print messages, instructions, or a prompt.  Used in
  4962.          conjunction with routines PULLDOWN and SCRLWIND these routines
  4963.          will change the message in the info-line as the scroll bar is
  4964.          moved through the selections in the pulldown and scroll windows.
  4965.  
  4966.  
  4967.          10.00 INFOLINE ( TR%, LC%, WD%, ATTR% )
  4968.  
  4969.               Description: Set up routine for routines PRINTINFO,
  4970.               INFOFIXED, AND RSTRINFO.  Sets the coordinates and the
  4971.               color for the info-line.  Defines the fixed info-string to
  4972.               equal "" ( SEE: INFOFIXED ).  Makes the info-line active.
  4973.               Saves the display area specified by TR%, LC%, and WD%.
  4974.               This area may be restored by calling routine RSTRINFO.
  4975.               INFOLINE DOES NOT PRINT OR DISPLAY THE INFO-LINE.  THIS IS
  4976.               ACCOMPLISHED BY ROUTINE PRINTINFO.  Routine PRINTINFO is
  4977.               incorporated in routines PULLDOWN and SCRLWIND.  It may
  4978.               also be used prior to calling other routines. ( SEE:
  4979.               Examples - Info-line routines )
  4980.  
  4981.               NOTE: IF AN INFO-LINE IS ACTIVE A CALL TO INFOLINE DOES
  4982.               NOTHING EXCEPT TO CHANGE THE COLOR (IF IT IS DIFFERENT) OF
  4983.               THE INFO-LINE FOR SUBSEQUENT CALLS TO PRINTINFO.  THE
  4984.               INFO-LINE IS DEACTIVATED VIA A CALL TO RSTRINFO.
  4985.  
  4986.               Arguments:   TR% is the top row position of the info-line.
  4987.               It must range from 1 to 25 or an error will be reported.
  4988.  
  4989.                            LC% is the left column position of the info-
  4990.               line.  If LC% + WD% > 81 an error will be reported.
  4991.  
  4992.                            WD% is the info-lines width.  If WD% + LC% >
  4993.               81 an error will be reported.
  4994.  
  4995.                            ATTR% is the info-lines color ( SEE THE COLOR
  4996.               ATTRIBUTE CHART ).  ATTR% must range from 1 to 255  or it
  4997.               is adjusted to ATTR% AND 127.
  4998.  
  4999.          10.01 PRINTINFO ( INFO$ )
  5000.  
  5001.               Description: Displays the info-line and prints in same.
  5002.               The info-line must be made active by a previous call to
  5003.               INFOLINE.  If a fixed info-string has been previously
  5004.               defined by a call to routine INFOFIXED, PRINTINFO adds
  5005.               it's text to the fixed info-string and displays the result
  5006.               in the info-line ( SEE: INFOFIXED ).  If an info-line is
  5007.               not active PRINTINFO does nothing.  ( SEE: Examples  -
  5008.               Info-line routines.
  5009.  
  5010.  
  5011.  
  5012.                                        73
  5013.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.  
  5021.  
  5022.  
  5023.               Argument:    INFO$ is the string which will print in the
  5024.               info-line.  If a fixed info-string has been defined by
  5025.               routine INFOFIXED, INFO$ is added to the fixed info-string
  5026.               with the result printing in the info-line.  If the length
  5027.               of the fixed info-string plus the length of INFO$ will not
  5028.               fit in info-line defined by routine INFOLINE it is
  5029.               truncated to fit.
  5030.  
  5031.  
  5032.          10.02 INFOFIXED ( FIXEDINFO$ )
  5033.  
  5034.               Description: Defines a fixed info-string which will print
  5035.               every time routine PRINTINFO is called.  As PRINTINFO is
  5036.               called for every entry in a scroll or pulldown window,
  5037.               INFOFIXED is useful for these routines.  The info-line
  5038.               must be active or INFOFIXED does nothing.
  5039.               ( SEE: Examples - Info-line routines )
  5040.  
  5041.               Argument:    FIXEDINFO$ is the fixed info-string.  It will
  5042.               remain the fixed info-string until routine RSRTINFO is
  5043.               called with argument DELFLAG% = 1 ( SEE: RSTRINFO ).  The
  5044.               fixed info-string may be temporarily disabled by calling
  5045.               INFOFIXED with FIXEDINFO$ equal to "".
  5046.  
  5047.  
  5048.          10.03 RSTRINFO ( DELFLAG% )
  5049.  
  5050.               Description: Restores the display area under the info-
  5051.               line.  This area was saved by a previous call to INFOLINE.
  5052.               If the info-line is not active RSTRINFO does nothing.
  5053.               (SEE: Examples - Info-line routines. )
  5054.  
  5055.               Argument:    DELFLAG% is set to 1 to deactivate the info-
  5056.               line.  If DELFLAG% = 1 the display area saved by routine
  5057.               INFOLINE is restored to the display.  An info-line will no
  5058.               longer be active.  If DELFLAG% = 0 the info-line remains
  5059.               active.  The saved display area is restored.  The saved
  5060.               display are remains in window memory, however.
  5061.               NOTE: THE SAVED DISPLAY AREA RESIDES IN WINDOW NUMBER 25.
  5062.               FUNCTION WAVAIL% CAN DETERMINE IF THE INFOLINE IS ACTIVE.
  5063.  
  5064.               EXAMPLE: IF WAVAIL%(25) = 0 ' The info-line is active.
  5065.                        IF WAVAIL%(25) = 1 ' the info-line is not active.
  5066.  
  5067.  
  5068.  
  5069.  
  5070.  
  5071.  
  5072.  
  5073.  
  5074.  
  5075.  
  5076.  
  5077.  
  5078.                                        74
  5079.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.          -----------------------------------------------------------------
  5090.          ' Example: Info-line routines
  5091.          ' THIS EXAMPLE WILL NOT RUN AS THE CALLS TO INPTWIND, SCRLWIND,
  5092.          ' AND PULLDOWN ARE NOT COMPLETE.
  5093.  
  5094.          ' INFO-LINE TOP ROW = 25
  5095.          ' INFO-LINE LEFT COLUMN = 1
  5096.          ' INFO-LINE WIDTH = 80
  5097.          ' INFO-LINE COLOR = BLACK ON GRAY
  5098.          ' SAVES DISPLAY AREA ( ALL OF ROW 25 AS WIDTH = 80 )
  5099.  
  5100.          CALL INFOLINE ( 25, 1, 80, 112 )     ' INFO-LINE MADE ACTIVE
  5101.  
  5102.          CALL PRINTINFO ( "INPUT YOUR NAME" ) ' PRINT IN INFO-LINE
  5103.  
  5104.          CALL INPTWIND.......                 ' TO INPUT A NAME
  5105.  
  5106.          CALL RSTRINFO ( 0 )       ' DISPLAY AREA UNDER INFO-LINE IS
  5107.                                    ' RESTORED TO DISPLAY.  INFO-LINE
  5108.                                    ' REMAINS ACTIVE.
  5109.  
  5110.          ' **** USE SAME INFO-LINE FOR A SCROLL WINDOW.  IN THIS EXAMPLE
  5111.          ' **** THE INFO-LINE DISPLAYS THE SAME MESSAGE FOR ALL ENTRIES IN
  5112.          ' **** THE SCROLL WINDOW.
  5113.  
  5114.          CALL INFOFIXED ( "MAKE A SELECTION" )
  5115.  
  5116.          DIM INFO$(0)              ' MUST BE DIMENSIONED TO 0 TO DISPLAY
  5117.                                    ' THE FIXED INFO-STRING ONLY.
  5118.  
  5119.          CALL SCRLWIND ( LIST$(), INFO$(), .....  ' MAKE SCROLL WINDOW
  5120.  
  5121.          ' "MAKE A SELECTION" IS PRINTED IN INFO-LINE FOR ALL ENTRIES IN
  5122.          ' THE SCROLL WINDOW.  ROUTINE SCRLWIND INTERNALLY CALLS ROUTINE
  5123.          ' PRINTINFO TO PRINT IN THE INFO-LINE.
  5124.  
  5125.          CALL RSTRINFO ( 0 )       ' DISPLAY AREA UNDER INFO-LINE IS
  5126.                                    ' RESTORED TO DISPLAY.  INFO-LINE
  5127.                                    ' REMAINS ACTIVE.
  5128.  
  5129.          CALL INFOFIXED ( "" )     ' REMOVE FIXED INFO-STRING.
  5130.  
  5131.  
  5132.          ' **** USE SAME INFO-LINE FOR A SCROLL WINDOW.  PRINT A DIFFERENT
  5133.          ' **** MESSAGE FOR EACH ITEM IN THE SCROLL WINDOW.
  5134.  
  5135.          CALL INFOFIXED ( "Directions: " ) ' Set fixed info-string
  5136.  
  5137.          DIM INFO$(3)                      ' The fixed info-string plus
  5138.          INFO$(1) = "Save a file."         ' these elements of INFO$() will
  5139.          INFO$(2) = "Load a file."         ' print for the corresponding
  5140.          INFO$(4) = "Delete a file."       ' entries in the scroll window.
  5141.  
  5142.  
  5143.  
  5144.                                        75
  5145.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155.          CALL SCRLWIND ( LIST$(), INFO$()..........
  5156.  
  5157.          ' ** The following will print in the info-line.
  5158.          ' "Directions: Save a file."  prints for scroll window entry 1.
  5159.          ' "Directions: Load a file."  prints for scroll window entry 2.
  5160.          ' "Directions: Save a file."  prints for scroll window entry 3.
  5161.  
  5162.          CALL RSTRINFO ( 0 )       ' DISPLAY AREA UNDER INFO-LINE IS
  5163.                                    ' RESTORED TO DISPLAY.  INFO-LINE
  5164.                                    ' REMAINS ACTIVE.
  5165.  
  5166.          ' **** USE THE SAME INFO-LINE FOR PULLDOWN WINDOWS.  THE FIXED
  5167.          ' **** INFO-STRING STILL EQUALS "Directions".
  5168.  
  5169.          DIM INFO$(20)                     ' The fixed info-string plus
  5170.          INFO$(1) = "Save a file."         ' these elements of INFO$() will
  5171.          INFO$(2) = "Load a file."         ' print for the corresponding
  5172.          INFO$(3) = "Delete a file."       ' entries in the scroll window.
  5173.  
  5174.          '...  DO UP TO THE 20TH ELEMENT OF INFO$
  5175.          '...
  5176.  
  5177.          ' NOTE: INFO$() MUST BE DIMENSIONED TO ZERO ( DIM INFO$(0) ). IF
  5178.          ' THE INFO-LINE IS NOT TO BE USED.  THE TEXT FOR THE INFO-LINE FOR
  5179.          ' THE MENUBAR ITEMS IS SET BY ROUTINE SETPULL.  INFO$() ONLY SETS
  5180.          ' THE TEXT FOR THE INFO-LINE FOR THE SELECTIONS IN THE PULLDOWN
  5181.          ' WINDOWS.
  5182.  
  5183.          CALL PULLDOWN ( INFO$()......
  5184.  
  5185.          ' ** The following will print in the info-line.
  5186.          ' "Directions: Save a file."  for pulldown window entry 1.
  5187.          ' "Directions: Load a file."  for pulldown window entry 2.
  5188.          ' "Directions: Save a file."  for pulldown window entry 3.
  5189.  
  5190.          CALL RSTRINFO ( 0 )       ' DISPLAY AREA UNDER INFO-LINE IS
  5191.                                    ' RESTORED TO DISPLAY.  INFO-LINE
  5192.                                    ' REMAINS ACTIVE.
  5193.  
  5194.  
  5195.          '*** USE SAME INFO-LINE WITH ROUTINE GETANS.  PROMPT IS PRINTED IN
  5196.          '*** INFO-LINE BY PRINTINFO.  GETANS DOES NOT PRINT A PROMPT. IT
  5197.          '*** ONLY WAITS FOR A REPLY.
  5198.  
  5199.          CALL PRINTINFO ( "(Y)es or (N)o ?" ) ' PROMPT USER FOR "Y" OR "N".
  5200.  
  5201.          CALL GETANS ("", "YN", ANS$, 100, 100, 112, 0 )
  5202.  
  5203.          ' GETANS COORDINATES ARE MEANINGLESS AS A PROMPT IS NOT PRINTED.
  5204.          ' COORDINATES MUST STILL BE WITHIN VALID RANGES.  THE BORDER
  5205.          ' DESIGNATION MUST BE SET TO ZERO OR GETANS WILL GENERATE A
  5206.          ' WINDOW.
  5207.  
  5208.  
  5209.  
  5210.                                        76
  5211.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.          CALL RSTRINFO ( 1 )       ' DISPLAY AREA UNDER INFO-LINE RESTORED
  5222.                                    ' TO DISPLAY.
  5223.                                    ' *** AS ARGUMENT = 1 THE INFO-LINE IS
  5224.                                    ' NO LONGER ACTIVE.  INFOLINE MUST BE
  5225.                                    ' CALLED AGAIN TO MAKE IT ACTIVE.
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.  
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.  
  5245.  
  5246.  
  5247.  
  5248.  
  5249.  
  5250.  
  5251.  
  5252.  
  5253.  
  5254.  
  5255.  
  5256.  
  5257.  
  5258.  
  5259.  
  5260.  
  5261.  
  5262.  
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.                                        77
  5277.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.  
  5285.  
  5286.  
  5287.                        PROGRAM FORMAT FOR WINDOWS R-E-Z
  5288.  
  5289.           ** NOTE: ALL NUMERIC VALUES MUST BE INTEGERS FOR ALL **
  5290.              PROCEDURES EXCEPT DISKSIZE. ( EX: A%, B%, DEFINT A-F )
  5291.  
  5292.               1. LOAD QUICKBASIC WITH CORRECT LIBRARY.
  5293.  
  5294.                  - UNENHANCED VERSION:
  5295.  
  5296.                  EX: QB/L QB4UNEN.QLB  ( QB 4.00, 4.00b, 4.50 )
  5297.                      QBX/L PDSUNEN.QLB  ( BASIC 7.0, 7.1 - PDS )
  5298.  
  5299.                  - ENHANCED VERSION:
  5300.  
  5301.                  EX: QB/L QB4ALL.QLB  ( QB 4.00, 4.00b, 4.50 )
  5302.                      QBX/L PDSALL70.QLB  ( BASIC 7.0 - PDS )
  5303.                      QBX/L PDSALL71.QLB  ( BASIC 7.1 - PDS )
  5304.               2. DECLARE ALL SUB-ROUTINES AND FUNCTIONS.
  5305.  
  5306.                  REM $INCLUDE: 'DECLARE.INC'
  5307.  
  5308.              ' 3. CALL SETWIND TO INITIALIZE WINDOW MEMORY, INPTINIT TO
  5309.              ' INITIALIZE INPUT ROUTINES.  TURN THE MOUSE ON AND SET
  5310.              ' MOUSE KEYS.
  5311.                  CLS
  5312.                  CALL SETWIND(1, 1, 7 )      'FAST WINDOWS
  5313.                                              'SOUND DEFAULTS TO "CLICK"
  5314.                                              'SHADOW COLOR = GRAY
  5315.  
  5316.                  CALL INPTINIT ( 1, 1, "")   'DATE = MM-DD-YYYY
  5317.                                              'PERIOD AS DECIMAL POINT
  5318.                                              'ESC & ENTER EXIT INPTWIND
  5319.  
  5320.                  CALL MOUSEON (1)            'MOUSE IS ON
  5321.                  CALL MBUTTONS (13,27)       'LEFT BUTTON = ENTER
  5322.                                              'RIGHT BUTTON = ESC
  5323.  
  5324.              ' 4. CALL SETPULL IF PULLDOWN WINDOWS ARE USED
  5325.  
  5326.                  A%= 25
  5327.                  DIM PWIND$(A%)                    ' SET TEMPORARY
  5328.                                                    ' ARRAY
  5329.                  DIM PULLINFOLINE$(0)              ' INFO-LINE NOT USED
  5330.                  TEMP%=0
  5331.                  WHILE PWIND$(TEMP%) <> "ENDPULL"
  5332.                     TEMP% = TEMP% + 1              ' ALWAYS START AT 1
  5333.                     READ PWIND$(TEMP%)             ' READ DATA FOR
  5334.                  WEND                              ' PULLDOWN WINDOWS.
  5335.  
  5336.                  CALL SETPULL (1, 1, 80, PWIND$()) ' CALL SETPULL
  5337.                  ERASE PWIND$                      ' AND ERASE ARRAY
  5338.  
  5339.  
  5340.  
  5341.  
  5342.                                        78
  5343.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.  
  5351.  
  5352.  
  5353.                  ' PULLDOWN WINDOW DATA
  5354.                  DATA THIS,,HELLO,JOE,***
  5355.                  DATA IS,,HOW,ARE,YOU,***
  5356.                  DATA A,,I,AM,FINE,***
  5357.                  DATA SAMPLE,,BYE,***
  5358.                  DATA ENDPULL
  5359.  
  5360.                  ON KEY(1) GOSUB PULL              ' MAKE THE F1 KEY
  5361.                                                    ' THE "HOT" KEY FOR
  5362.                                                    ' PULLDOWN WINDOWS
  5363.  
  5364.               '5. READ DATA FOR SCROLL WINDOW(S)
  5365.  
  5366.                  DIM LIST$(10)                     ' DIMENSION ARRAY
  5367.                  FOR X%= 1 TO 10                   ' AND READ SCROLL
  5368.                   READ LIST$(X%)                   ' WINDOW DATA
  5369.                  NEXT
  5370.  
  5371.                  DATA ONE, TWO, THREE, FOUR, FIVE  ' DATA FOR A SCROLL
  5372.                  DATA SIX, SEVEN, EIGHT, NINE, TEN ' WINDOW
  5373.  
  5374.  
  5375.               '6. READ DATA FOR MULTI-FIELD INPUT SCREEN(S)
  5376.  
  5377.                  A%=20
  5378.                  B%=3
  5379.                  DIM INPT%(A%),INPT$(B%)         ' TEMPORARY ARRAYS
  5380.  
  5381.                  TEMP% = 1                       ' ALWAYS START AT 1
  5382.                  FLD%=1
  5383.                  DO
  5384.                    READ INPT%(TEMP%)             ' READ CODE%.
  5385.                                                  ' IF CODE%=9999 DONE.
  5386.                    IF INPT%(TEMP%)=9999 THEN EXIT DO
  5387.                    TEMP%=TEMP%+1
  5388.                    FOR X%=1 TO 5                 ' READ REMAINING 5
  5389.                      READ INPT%(TEMP%)           ' NUMERIC VALUES IN
  5390.                                                  ' INPT%().
  5391.                      TEMP% = TEMP% + 1
  5392.                    NEXT
  5393.                    READ INPT$(FLD%)               ' READ FIELD DATA IN
  5394.                    FLD%=FLD%+1                    ' INPT$() - RESTRICT
  5395.                  LOOP                             ' DATA.
  5396.  
  5397.                  ' MULTI- FIELD INPUT DATA
  5398.  
  5399.                  DATA 0,1,1,15,7,99,""
  5400.                  DATA 11007,3,1,40,7,99,""
  5401.                  DATA 108,5,1,10,32,99,""
  5402.                  DATA 9999
  5403.                  CALL SETINPT( 1, 80, "12", INPT%(), INPT$(),0 ) ' SET INPUT
  5404.                                                                  ' SCREEN.
  5405.  
  5406.  
  5407.  
  5408.                                        79
  5409.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.  
  5417.  
  5418.  
  5419.  
  5420.                  ERASE INPT%,INPT$             ' GET THE MEMORY BACK
  5421.  
  5422.              '7. ENTER THE PROGRAM
  5423.                  MAIN:
  5424.                  LOCATE 25, 1 :PRINT "PRESS F1"
  5425.                  KEY (1) ON                 ' TURN ON "HOT" KEY AT
  5426.               '  .                          ' APPROPRIATE SPOT IN
  5427.               '  .                          ' PROGRAM.
  5428.               '  .                          ' WAIT FOR F1 KEY.
  5429.                  GOTO MAIN
  5430.                  REM  PULL IS A SUB ROUTINE WHICH IS ENTERED VIA THE
  5431.                  REM  F1 KEY BEING PRESSED.  THIS SUB DISPLAYS THE
  5432.                  REM  PULLDOWN WINDOW AND WAITS FOR AN ITEM TO BE
  5433.                  REM  SELECTED FROM SAME.  IF THE ESC KEY IS PRESSED
  5434.                  REM  THE PROGRAM RESUMES EXECUTION WHERE IT WAS
  5435.                  REM  INTERRUPTED BY THE F1 KEY.  IF AN ITEM IS
  5436.                  REM  SELECTED A ROUTINE IS EXECUTED.  AFTER EXECUT-
  5437.                  REM  ION THE PROGRAM CONTINUES AT MAIN.
  5438.                  REM  THIS IS A SUGGESTION FOR A METHOD TO USE PULL-
  5439.                  REM  DOWN WINDOWS.  ALTERNATE METHODS MAY BE USED,
  5440.                  REM  SUCH AS CALL "PULLDOWN" AT START OF PROGRAM.
  5441.                  REM  AND NOT USING A HOT KEY.
  5442.  
  5443.                  PULL:
  5444.                  KEY (1) OFF
  5445.  
  5446.                  REM: MUST BE ON ONE LINE IN QB, QBX EDITOR.
  5447.                  CALL PULLDOWN (PULLINFOLINE$(), MENUITEM% , WINDITEM%, "E",
  5448.                                RKEY%, 112, 15, 11)
  5449.  
  5450.                  CALL RSTRPULL (1)            ' RESTORE AREA UNDER
  5451.                                               ' PULLDOWN WINDOW.
  5452.                  SELECT CASE MENUITEM%
  5453.  
  5454.                   CASE 1                      ' MENUBAR ITEM = THIS
  5455.                     SELECT CASE WINDITEM%
  5456.                       CASE 1                  ' HELLO
  5457.                '       .                      ' ROUTINE FOR HELLO
  5458.                '       .
  5459.                       CASE 2                  ' JOE
  5460.                '       .                      ' ROUTINE FOR JOE
  5461.                '       .
  5462.                     END SELECT
  5463.  
  5464.                   CASE 2                      ' MENUBAR ITEM = IS
  5465.                     SELECT CASE WINDITEM%
  5466.                       CASE 1                  ' HOW
  5467.                 '      .                      ' ROUTINE FOR HOW
  5468.                 '      .
  5469.                       CASE 2                  ' ARE
  5470.                 '      .                      ' ROUTINE FOR ARE
  5471.  
  5472.  
  5473.  
  5474.                                        80
  5475.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.                 '      .
  5486.                       CASE 3                  ' YOU
  5487.                 '      .                      ' ROUTINE FOR YOU
  5488.                 '      .
  5489.                     END SELECT
  5490.  
  5491.                   CASE 3                      ' MENUBAR ITEM = A
  5492.                     SELECT CASE WINDITEM%
  5493.                       CASE 1                  ' I
  5494.                 '      .                      ' ROUTINE FOR I
  5495.                 '      .
  5496.                       CASE 2                  ' AM
  5497.                 '      .                      ' ROUTINE FOR AM
  5498.                 '      .
  5499.                       CASE 3                  ' FINE
  5500.                 '      .                      ' ROUTINE FOR FINE
  5501.                 '      .
  5502.                     END SELECT
  5503.  
  5504.                   CASE 4                      ' MENUBAR ITEM = SAMPLE
  5505.                 '      .                      ' ROUTINE FOR SAMPLE
  5506.                 '      .                      ' ( OR BYE )
  5507.  
  5508.                   CASE ELSE
  5509.                      END                      ' WAS ESC
  5510.                 END SELECT
  5511.                     KEY (1) ON
  5512.                     RETURN MAIN                ' DONE WITH THE ROUTINE
  5513.                                                ' SELECTED FROM
  5514.                                                ' PULLDOWN WINDOWS
  5515.  
  5516.  
  5517.  
  5518.  
  5519.  
  5520.  
  5521.  
  5522.  
  5523.  
  5524.  
  5525.  
  5526.  
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.                                        81
  5541.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.  
  5550.  
  5551.                          MAKING A CUSTOMIZED LIBRARY
  5552.                           ( Enhanced version only )
  5553.  
  5554.               Users familiar with LINK and LIB utilities may prefer to
  5555.           create libraries outside of QuickBASIC'S environment using
  5556.           the appropriate object files.  As individual assembly object
  5557.           files can be linked together to create smaller libraries
  5558.           this is the preferable method.  See the section "FILES" for
  5559.           a description of all files.
  5560.               The libraries ( QB4ALL.QLB, PDSALL70.QLB, PDSALL71.QLB,
  5561.           QB4ALL.LIB, PDSALL70.LIB and PDSALL71.LIB ) are complete and
  5562.           contain all of the procedures in WINDOWS R-E-Z.  If all of
  5563.           the procedures are not required in your program customized
  5564.           libraries using less memory may be made in the QuickBASIC
  5565.           environment as follows:
  5566.  
  5567.           For QB 4.00 and 4.00b:
  5568.  
  5569.           1. Load QuickBASIC using the command QB/L QB4ASM.  The file,
  5570.              QB4ASM.QLB, contains the assembly routines required by
  5571.              all of the other procedures.
  5572.  
  5573.           2. Load the modules  WIND_REZ.BAS and QB4MEM.BAS. ALL
  5574.              PROCEDURES EXCEPT THOSE IN DIRWIND.BAS REQUIRE THESE
  5575.              MODULES.  They contain the basic windowing routines.  If
  5576.              this is all your program requires select the Make library
  5577.              option from the Run menu in QuickBASIC (see your manual)
  5578.              to make the library. ( QB4ASM.LIB must be present.)
  5579.  
  5580.           3. Load any other modules your program requires.  IF YOU
  5581.              WANT TO USE PULLDOWN WINDOWS THE MODULES PULLDOWN.BAS
  5582.              AND SCROLL.BAS MUST BOTH BE LOADED.  All other
  5583.              modules may be loaded independent of each other.
  5584.              When all of the modules you will be using are loaded
  5585.              make the library as in step 2.
  5586.  
  5587.           Two libraries will be produced.  The library with the suffix
  5588.           .QLB is used in the QuickBASIC environment and the library
  5589.           with the suffix .LIB must be available to produce an
  5590.           executable file.  To use your new library ( assuming a name
  5591.           of NEWLIB.QLB ) exit QuickBASIC and reload with the command
  5592.           QB/L NEWLIB.
  5593.  
  5594.           For QuickBASIC version 4.50 and BASIC 7.+ ( PDS );
  5595.  
  5596.           Versions 4.5 of QuickBasic and BASIC 7.0+ ( PDS ) do not use
  5597.           the "full library" mode while linking.  Therefore it is not
  5598.           necessary to build a customized library or link outside of
  5599.           the QuickBASIC environment to produce the smallest possible
  5600.           executable programs.
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.                                        82
  5607.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.  
  5615.  
  5616.  
  5617.                                      FILES
  5618.  
  5619.               The following files are included with WINDOWS R-E-Z.
  5620.           Files starting with "QB4" are for use with QB 4.00, QB 4.00b
  5621.           and QB 4.50. These files are not included with WINDOWS R-E-Z
  5622.           for BASIC 7.+ ( PDS ).  Files starting with "PDS" are for
  5623.           use with BASIC 7.+, ( PDS ) These files are not included
  5624.           with WINDOWS R-E-Z for QB 4.+.
  5625.  
  5626.           Library Files:
  5627.  
  5628.           - Library consisting of all assembly procedures.
  5629.  
  5630.            *  QB4ASM.LIB --  For QuickBASIC 4.+
  5631.            *  PDSASM.LIB --  For BASIC 7.+
  5632.  
  5633.           - QuickBASIC version of QB4ASM.LIB or PDSASM.LIB
  5634.  
  5635.            *  QB4ASM.QLB --  For QuickBASIC 4.+
  5636.            *  PDSASM.QLB --  For BASIC 7.+
  5637.  
  5638.           - Library consisting of all assembly and BASIC procedures.
  5639.  
  5640.            *  QBALL45.LIB -- For QuickBASIC 4.50
  5641.            *  QBALL40.LIB -- For QuickBASIC 4.00/4.00b
  5642.            *  PDSALL70.LIB - For Basic 7.0
  5643.            *  PDSALL71.LIB - For Basic 7.1
  5644.           **  QB4UNEN.LIB -- For QuickBASIC 4.+  ( unenhanced )
  5645.           **  PDSUNEN.LIB -- For BASIC 7.+       ( unenhanced )
  5646.  
  5647.           - QuickBASIC version of QB4ALL.LIB, PDSALL70.QLB or
  5648.             PDSALL71.QLB.
  5649.  
  5650.            *  QBALL45.QLB -- For QuickBASIC 4.50
  5651.            *  QBALL40.QLB -- For QuickBASIC 4.00/4.00b
  5652.            *  PDSALL70.QLB - For BASIC 7.0
  5653.            *  PDSALL71.QLB - For BASIC 7.1
  5654.           **  QB4UNEN.QLB -- For QuickBASIC 4.+  ( unenhanced )
  5655.           **  PDSUNEN.QLB -- For BASIC 7.+       ( unenhanced )
  5656.  
  5657.           - Library of all assembly and BASIC procedures without
  5658.             error detection or window status.  Program MUST be
  5659.             completely "debugged" before these are used.
  5660.  
  5661.            *  QBNER45.LIB -- For QuickBASIC 4.50
  5662.            *  QBNER40.LIB -- For QuickBASIC 4.00/4.00b
  5663.            *  PDSNER70.LIB - For BASIC 7.0
  5664.            *  PDSNER71.LIB - For BASIC 7.1
  5665.  
  5666.  
  5667.            * Not included with the unenhanced version of WINDOWS R-E-Z.
  5668.           ** Not included with the enhanced version of WINDOWS R-E-Z.
  5669.  
  5670.  
  5671.  
  5672.                                        83
  5673.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.  
  5681.  
  5682.  
  5683.           - QuickBASIC version of QB4NER.LIB, PDSNER70.LIB or
  5684.             PDSNER71.LIB.
  5685.  
  5686.            *  QBNER45.QLB -- For QuickBASIC 4.50
  5687.            *  QBNER40.QLB -- For QuickBASIC 4.00/4.00B
  5688.            *  PDSNER70.QLB - For BASIC 7.0
  5689.            *  PDSNER71.QLB - For BASIC 7.1
  5690.  
  5691.           Object Files:
  5692.  
  5693.            *  QB4WIND.OBJ -- Object file of assembly windowing
  5694.            *  PDSWIND.OBJ    routines.
  5695.            *  QB4INPT.OBJ -- Object file of assembly input routines.
  5696.            *  PDSINPT.OBJ    "                                    "
  5697.            *  QB4DIR.OBJ --- Object file of assembly directory
  5698.            *  PDSDIR.OBJ     routines.
  5699.            *  QB4SCRL.OBJ -- Object file of assembly scroll
  5700.            *  PDSSCRL.OBL    routines
  5701.            *  PDSMEM70.OBJ - Alternate memory management module.
  5702.            *  PDSMEM71.OBJ - "                                 "
  5703.  
  5704.           Basic Files:
  5705.  
  5706.            *  INPTWIND.BAS - BASIC source code for routines in
  5707.            *  PULLDOWN.BAS   WINDOWS R-E-Z.
  5708.            *  SCROLL.BAS           "
  5709.            *  WIND_REZ.BAS         "
  5710.            *  DIRWIND.BAS          "
  5711.            *  QB4MEM.BAS                        ( QuickBASIC 4.+ )
  5712.            *  PDSMEM.BAS                        ( BASIC 7.+ )
  5713.  
  5714.          Demonstration files.
  5715.  
  5716.               DEMO.BAS ----- Source code for demonstration program.
  5717.               DEMPART2.BAS - Source code ( part 2 ) demonstration.
  5718.               MULTSAM1.BAS   Sample multi-field input program
  5719.               MULTSAM2.BAS         "
  5720.               MULTSAM3.BAS         "
  5721.               SCRLRAND.BAS   Scroll through a random acess file.
  5722.               RANDDATA.DAT   Sample random access database.
  5723.               SCRLISAM.BAS   Scroll through an ISAM table.
  5724.               ISAMDATA.DAT   Sample ISAM data file.
  5725.  
  5726.            NOTE:  All BASIC files except QB4MEM.BAS and PDSMEM.BAS are
  5727.            the same for QuickBASIC 4.+  and  BASIC 7.0/7.1. All basic
  5728.            routines require the presence of the module WIND_REZ.BAS.
  5729.  
  5730.  
  5731.  
  5732.  
  5733.            * Not included with the unenhanced version of WINDOWS R-E-Z.
  5734.           ** Not included with the enhanced version of WINDOWS R-E-Z.
  5735.  
  5736.  
  5737.  
  5738.                                        84
  5739.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.           Other Files:
  5750.  
  5751.           **  WIND_REZ.DOC - This document.
  5752.            *  WIND_REZ.EXE - Self-extracting compressed documentation.
  5753.                              Un-compresses to WIND_REZ.DOC.
  5754.               SCRLFILE.DOC - Scroll through file documentation.
  5755.               DEMO.EXE ----- Demonstration program.
  5756.               PRNTDOT.BAT -- Batch file for printing WIND_REZ.DOC.
  5757.               PRNTLAS.BAT -- Batch file for printing WIND_REZ.DOC on a
  5758.                              HP compatible laser printer.
  5759.               DECLARE.INC -- INCLUDE file containing DECLARE
  5760.                              statements for all routines.
  5761.               ORDER.ME ----- Order form for WINDOWS R-E-Z.
  5762.               READ.ME  ----- Update information.
  5763.            *  QUICKREF.DOC - Quick reference guide.
  5764.            *  PRNTDOT2.BAT - Batch file for printing QUICKREF.DOC.
  5765.            *  PRNTLAS2.BAT - Batch file for printing QUICKREF.DOC on a
  5766.                              HP compatible laser printer.
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.  
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.            * Not included with the unenhanced version of WINDOWS R-E-Z.
  5800.           ** Not included with the enhanced version of WINDOWS R-E-Z.
  5801.  
  5802.  
  5803.  
  5804.                                        85
  5805.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.  
  5813.  
  5814.  
  5815.                                     Errors
  5816.  
  5817.           The following is a listing of the errors WINDOWS R-E-Z
  5818.           will detect.
  5819.  
  5820.           ERROR #       DESCRIPTION
  5821.           ------------------------------------------------------------
  5822.  
  5823.           ERROR 0       There is no active window.  SCRLWIND, RESAVE
  5824.                         CLRWIND, PRINTW, LINEW, and NEWCOLOR require
  5825.                         an active window.
  5826.  
  5827.           ERROR 1       SETWIND has not been called to initialize
  5828.                         window memory.  This error will also be reported
  5829.                         if the program uses a CLEAR statement and SETWIND
  5830.                         has not be called to re-initialize window
  5831.                         memory.
  5832.  
  5833.           ERROR 2       A window number has been specified which is
  5834.                         out of range for the calling routine.  Window
  5835.                         number 20 is the maximum window number for all
  5836.                         routines.  Window number 1 is the minimum
  5837.                         window number for SAVEWIND, DELWIND, and
  5838.                         RSTRWIND.  Window number 0 is the minimum
  5839.                         window number for MAKEWIND and CHNGWIND.
  5840.  
  5841.           ERROR 3       The shadow, specified in a call to MAKEWIND,
  5842.                         will not fit on the screen.  If this error is
  5843.                         displayed the window will fit on the screen
  5844.                         but the shadow will not.
  5845.  
  5846.           ERROR 4       The window will not fit on the screen or the
  5847.                         window is too small.  The left column plus the
  5848.                         window's width makes the window too wide or the
  5849.                         top row plus the number of rows makes the
  5850.                         window too tall.  The left column and top row
  5851.                         must be greater than 0.  The width and number
  5852.                         of rows must be greater than 2.  GETANS makes a
  5853.                         window with a width predicated on the width of
  5854.                         the prompt.  INPTWIND makes a window with a
  5855.                         width based on the length of the prompt plus
  5856.                         the width of the input field.  PULLDOWN windows
  5857.                         have a width based on the longest item in the
  5858.                         pulldown window's list.  This error is reported
  5859.                         for INPTWIND and GETANS if no window is
  5860.                         specified ( BORDER%=0 ) and the width of the
  5861.                         prompt and/or field will not fit on the screen.
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.                                        86
  5871.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.  
  5879.  
  5880.  
  5881.           ERROR 5       The border designation is not valid for the
  5882.                         calling routine.  GETANS does not allow title
  5883.                         windows.  PULLDOWN does not allow title
  5884.                         windows and only allows right-bottom shadows.
  5885.                         SEE THE BORDER DESIGNATION CHART.
  5886.  
  5887.           ERROR 6       A request was made to CHNGWIND to make the
  5888.                         active window a non-existent window or a
  5889.                         window saved via SAVEWIND.  The active window
  5890.                         can only be a window generated by MAKEWIND.
  5891.  
  5892.           ERROR 7       A call was made to RESAVE when the active
  5893.                         window was window number 0.  RESAVE can only
  5894.                         resave active window 1 to 20.
  5895.  
  5896.           ERROR 8       An window specified in a call to MAKEWIND or
  5897.                         SAVEWIND previously existed.  A window must be
  5898.                         deleted via a call to DELWIND or RSTRWIND
  5899.                         before the number assigned to it can be used
  5900.                         again.  This error will not be reported for
  5901.                         window number 0 as it is not saved.
  5902.  
  5903.           ERROR 9       A call to INPTINIT was not made to initialize
  5904.                         input memory.  INPTINIT must be called once in
  5905.                         every program prior to calling routines INPTWIND
  5906.                         or MULTINPT.
  5907.  
  5908.           ERROR 11      A bad row number was specified in a call to
  5909.                         PRINTW or LINEW.  The row number must be
  5910.                         greater than 0.  PRINTW allows print on the
  5911.                         bottom border.  LINEW does not.  The string
  5912.                         specified in a call to PRINTW will not fit in
  5913.                         the window due to it's length or it's left
  5914.                         column ( start print ) position.
  5915.  
  5916.           ERROR 12      The row position of the info-line is less than
  5917.                         1 or greater than 25. The left column position
  5918.                         is out of range.  A combination of the left
  5919.                         column position plus the specified width will not
  5920.                         allow the info-line to fit on one line.
  5921.  
  5922.           ERROR 21      The array ( LIST$() ) in a call to SCRLWIND
  5923.                         has a lower dimension greater than 1 or an
  5924.                         upper dimension less then the number of
  5925.                         entries ( ENTRIES% ) in the list.
  5926.  
  5927.           ERROR 22      A call was made to SCRLWIND with less than one
  5928.                         entry ( ENTRIES% ).
  5929.  
  5930.           ERROR 23      A scroll window requires a minimum width of 5.
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.                                        87
  5937.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.  
  5945.  
  5946.  
  5947.           ERROR 24      At least one of the strings in the list for a
  5948.                         scroll window ( SCRLWIND ) will not fit in the
  5949.                         window, allowing for a space on either side of
  5950.                         the string. ( non-virtual scroll windows only )
  5951.  
  5952.           ERROR 24      The number of entries in an "EXTENDED" scroll
  5953.                         window exceeds the number or interior rows in the
  5954.                         scroll window.
  5955.  
  5956.           ERROR 31      The location of menubar string specified in a
  5957.                         call to SETPULL is invalid.  The row position may
  5958.                         range from 1 to 21. The left column position plus
  5959.                         the menubar's width may not exceed 81.
  5960.  
  5961.           ERROR 32      The menubar string specified in a call to
  5962.                         SETPULL has over 10 items or less than 2 items
  5963.                         in it.
  5964.  
  5965.           ERROR 33      There are no items in a pulldown window.  Two
  5966.                         consecutive "***"'s may be in the data stream.
  5967.  
  5968.           ERROR 41      The requested width of in input field in
  5969.                         INPTWIND is out of range.  The maximum width
  5970.                         is 15 for numeric fields, the screens width
  5971.                         minus 4 for windowed ALPHA/NUMERIC fields, or
  5972.                         the screens width minus 1 for un-windowed
  5973.                         ALPHA/NUMERIC fields.  The minimum width for a
  5974.                         numeric field is the number of decimal places
  5975.                         plus one.  The minimum width for an ALPHA-
  5976.                         NUMERIC field is 1.  A date field must have a
  5977.                         width of 8 or 10.
  5978.  
  5979.           ERROR 42      The field code in INPTWIND does not consist of
  5980.                         legal characters. ("0","1","2","3","4","5","6",
  5981.                          "A","L","U","D","P0","P1","P2","P3","P4","P5,
  5982.                         or "P6 )
  5983.  
  5984.           ERROR 51      The screen number in MULTINPT is less than one
  5985.                         or over 10. ( over 4 for unenhanced version )
  5986.  
  5987.           ERROR 52      The array ( RTRN$() ) specified in a call to
  5988.                         MULTINPT has a lower dimension of greater than
  5989.                         one or an upper dimension less than the number
  5990.                         of fields in the multi-field input screen.
  5991.  
  5992.           ERROR 53      The screen number in a call to MULTINPT was
  5993.                         not defined via a call to SETINPT.
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.                                        88
  6003.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.  
  6011.  
  6012.  
  6013.           ERROR 54      The field number ( TOFLD%) specified in call to
  6014.                         MULTINPT is greater than the number of fields in
  6015.                         the multi-field input screen or less than one.
  6016.                         The auto-exit ( AUTOEXIT%) field is greater than the
  6017.                         number of fields in the multi-field input screen or
  6018.                         less than 0.
  6019.  
  6020.           ERROR 55      The screen width when MULTINPT was called was
  6021.                         not the same as specified when the multi-field
  6022.                         input screen was defined by SETINPT.
  6023.  
  6024.           ERROR 61      The screen number in a call to SETINPT is less
  6025.                         than one or greater than 10.
  6026.  
  6027.           ERROR 62      The screen width in a call to SETINPT is not
  6028.                         80 or 40.
  6029.  
  6030.           ERROR 63      The exit string ( EXIT$ ) in a call to SETINPT
  6031.                         is null or contains an illegal character.
  6032.                         Legal characters are:  "1234567890EUD".
  6033.  
  6034.           ERROR 64      The input data ( INPT%(), INPUT$() ) is not in
  6035.                         the correct format in a call to SETINPT.
  6036.  
  6037.           ERROR 65      Over 150 fields were defined in a call to
  6038.                         SETINPT.  ( 25 in the unenhanced version )
  6039.  
  6040.           ERROR 66      No fields were defined in a call to SETINPT.
  6041.  
  6042.  
  6043.           ERROR 67      At least one field in a call to SETINPT has an
  6044.                         illegal field code.  SEE THE MULTI-FIELD CODE
  6045.                         CHART.
  6046.  
  6047.           ERROR 68      The field width is not appropriate for the
  6048.                         type of field specified in a call to SETINPT.
  6049.  
  6050.           ERROR 69      The left position plus the width of a field
  6051.                         defined in a call to SETINPT will not allow
  6052.                         the field to fit on the screen.  The row or
  6053.                         column position is less than one.  The row
  6054.                         position of a field is greater than 26.
  6055.  
  6056.           ERROR 70      All fields defined in a call to SETINPT are
  6057.                         protected fields.  No input is possible.
  6058.  
  6059.           ERROR 71      The cumulative total of restrict characters
  6060.                         for all fields for a multi-field input screen
  6061.                         defined via SETINPT is greater than 1023.
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.                                        89
  6069.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.  
  6077.  
  6078.  
  6079.           ERROR 72      The number of characters in a restrict string
  6080.                         ( INPT$() ) for an individual field defined
  6081.                         in a call to SETINPT is greater than 255.
  6082.  
  6083.           ERROR 73      The array ( INPT$() ) in SETINPT, which
  6084.                         defines the field's restrict strings is
  6085.                         dimensioned less than the number of fields or
  6086.                         has a lower dimension greater than one.
  6087.  
  6088.  
  6089.  
  6090.  
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.  
  6099.  
  6100.  
  6101.  
  6102.  
  6103.  
  6104.  
  6105.  
  6106.  
  6107.  
  6108.  
  6109.  
  6110.  
  6111.  
  6112.  
  6113.  
  6114.  
  6115.  
  6116.  
  6117.  
  6118.  
  6119.  
  6120.  
  6121.  
  6122.  
  6123.  
  6124.  
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.                                        90
  6135.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.  
  6143.  
  6144.  
  6145.                                    APPENDIX I
  6146.                                Color Attribute Chart
  6147.  
  6148.           ATTRIBUTE                 BACKGROUND              FOREGROUND
  6149.  
  6150.           START     END
  6151.  
  6152.           0  ------ 15               BLACK                  NORMAL
  6153.           16 ------ 31               BLUE                   NORMAL
  6154.           32 ------ 47               GREEN                  NORMAL
  6155.           48 ------ 63               CYAN                   NORMAL
  6156.           64 ------ 79               RED                    NORMAL
  6157.           80 ------ 95               MAGENTA                NORMAL
  6158.           96 ------ 111              BROWN                  NORMAL
  6159.           112 ----- 127              LIGHT GRAY             NORMAL
  6160.           128 ----- 143              BLACK                  FLASHING
  6161.           144 ----- 159              BLUE                   FLASHING
  6162.           160 ----- 175              GREEN                  FLASHING
  6163.           176 ----- 191              CYAN                   FLASHING
  6164.           192 ----- 207              RED                    FLASHING
  6165.           208 ----- 223              MAGENTA                FLASHING
  6166.           224 ----- 239              BROWN                  FLASHING
  6167.           240 ----- 255              LIGHT GRAY             FLASHING
  6168.           -----------------------------------------------------------
  6169.           OFFSET FROM START                                 FOREGROUND
  6170.  
  6171.           0                                                 BLACK
  6172.           1                                                 BLUE
  6173.           2                                                 GREEN
  6174.           3                                                 CYAN
  6175.           4                                                 RED
  6176.           5                                                 MAGENTA
  6177.           6                                                 BROWN
  6178.           7                                                 LIGHT GRAY
  6179.           8                                                 DARK GRAY
  6180.           9                                                 LIGHT BLUE
  6181.           10                                                LIGHT GREEN
  6182.           11                                                LIGHT CYAN
  6183.           12                                                LIGHT RED
  6184.           13                                                LIGHT MAGENTA
  6185.           14                                                YELLOW
  6186.           15                                                WHITE
  6187.  
  6188.  
  6189.           EXAMPLE: If the attribute = 242 then the background color is
  6190.                    light gray and the foreground flashes.  The offset
  6191.                    from start = 242 - 240 or 2, so the foreground color
  6192.                    is green.
  6193.  
  6194.           NOTE: GETANS and SCRLWIND allow a flashing border only.
  6195.           CHNGPULL, PULLDOWN, AND MULTINPT will not allow a flashing
  6196.           border or text.
  6197.  
  6198.  
  6199.  
  6200.                                        91
  6201.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.  
  6209.  
  6210.  
  6211.                                    APPENDIX II
  6212.  
  6213.                              Multi-field code chart
  6214.  
  6215.  
  6216.           The code for each field can be up to five digits long.  The
  6217.           digits are numbered 5,4,3,2 and 1, with 1 being the least
  6218.           significant digit and 5 the most significant digit.
  6219.  
  6220.           DIGIT NUMBER -------  5  4  3  2  1
  6221.  
  6222.           EXAMPLE CODE% ------  2  1  0  1  6
  6223.  
  6224.           - Digits 1 and 2 set the field type and can be:
  6225.  
  6226.           00  ------ Numeric - no decimal places.
  6227.           01 to 06 - Numeric - 1 to 6 decimal places
  6228.  
  6229.           10 ------- Numeric - no decimal places - padded with leading
  6230.                      zeros.
  6231.           11 to 16 - Numeric - 1 to 6 decimal places - padded with
  6232.                      leading zeros.
  6233.  
  6234.           07 ------- Alpha/numeric
  6235.           17 ------- Alpha/numeric -- UPPER CASE
  6236.           27 ------- Alpha/numeric -- lower case
  6237.  
  6238.           08 ------- Date
  6239.  
  6240.           - Digit 3 sets a protected field ( No entry ) and can be:
  6241.  
  6242.           0 -------- Field is NOT protected.
  6243.           1 -------- Field is protected.
  6244.  
  6245.           - Digit 4 sets an Auto-advance field and can be:
  6246.  
  6247.           0 -------- Field is NOT Auto-advance.
  6248.           1 -------- Field is Auto-advance.
  6249.  
  6250.           - Digit ---- 5 sets an Auto-exit field and can be:
  6251.  
  6252.           0 -------- Field is NOT Auto-exit.
  6253.           1 -------- Field is Auto-exit. ( Always )
  6254.           2 -------- Field is Auto-exit. ( On change only )
  6255.           3 -------- Field is Fixed-choice. ( auto-exit - always )
  6256.  
  6257.           EXAMPLE: IF CODE% = 21016 the field is decimal with padded
  6258.                    zero's, Auto-advance, and Auto-exit ( on change ).
  6259.  
  6260.           NOTE: If digit 3 is set to 1 (protected) digits 4 and 5 are
  6261.                 ignored .
  6262.  
  6263.  
  6264.  
  6265.  
  6266.                                        92
  6267.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.  
  6275.  
  6276.  
  6277.                                   APPENDIX III
  6278.  
  6279.                                Border Designations
  6280.  
  6281.         DIGIT NUMBER         3    2    1
  6282.         EXAMPLE BORDER%      1    2    1       ( 121 )
  6283.  
  6284.         Digit 1 = Border     Digit 2 = Shadow   Digit 3 = Title Box
  6285.  
  6286.         Example (121) = title box/ left bottom shadow/ single line border
  6287.         ------------------------------------------------------------------
  6288.                     :---Border---:          :------- Shadow -----------:
  6289.           Border    Single  Double   Title  Right   Left    Left  Right
  6290.           Value     Line    Line     Box    Bottom  Bottom  Top   Top
  6291.  
  6292.               0            No border, title box, or shadow
  6293.               1     X
  6294.               2             X
  6295.              10                              X
  6296.              11     X                        X
  6297.              12             X                X
  6298.              20                                     X
  6299.              21     X                               X
  6300.              22             X                       X
  6301.              30                                             X
  6302.              31     X                                       X
  6303.              32             X                               X
  6304.              40                                                    X
  6305.              41     X                                              X
  6306.              42             X                                      X
  6307.  
  6308.             100                       X
  6309.             101     X                 X
  6310.             102             X         X
  6311.             110                       X      X
  6312.             111     X                 X      X
  6313.             112             X         X      X
  6314.             120                       X             X
  6315.             121     X                 X             X
  6316.             122             X         X             X
  6317.             130                       X                     X
  6318.             131     X                 X                     X
  6319.             132             X         X                     X
  6320.             140                       X                            X
  6321.             141     X                 X                            X
  6322.             142             X         X                            X
  6323.           -------------------------------------------------------------------
  6324.           See individual routines for restrictions.
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.                                        93
  6333.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.  
  6343.                                APPENDIX IV
  6344.  
  6345.                            KEYMOUSE CODE VALUES
  6346.  
  6347.           KEYMOUSE%       Key(s)
  6348.  
  6349.           1 to 255        The equivalent key which produces the
  6350.                           corresponding ASCII/IBM code.
  6351.                           ( 65 = A, 66 = B etc. )
  6352.  
  6353.           15104          F1
  6354.           15360          F2
  6355.           15616          F3
  6356.           15872          F4
  6357.           16128          F5
  6358.           16384          F6
  6359.           16640          F7
  6360.           16896          F8
  6361.           17152          F9
  6362.           17408          F10
  6363.           18432          UP ARROW     ( MOUSE UP )
  6364.           20480          DOWN ARROW   ( MOUSE DOWN )
  6365.           19200          LEFT ARROW   ( MOUSE LEFT )
  6366.           19712          RIGHT ARROW  ( MOUSE RIGHT )
  6367.           18688          PGUP
  6368.           20736          PGDN
  6369.           18176          HOME
  6370.           20224          END
  6371.           20992          INSERT
  6372.           21248          DELETE
  6373.           29952          CTRL-END
  6374.           30464          CTRL-HOME
  6375.  
  6376.           NOTE: THIS LIST IS NOT ALL INCLUSIVE.  IT DOES PROVIDE
  6377.           VALUES FOR COMMON KEYS OR KEY COMBINATIONS.
  6378.  
  6379.           To find the values for other keys or key combinations this
  6380.           small program can be used.  Press ESC to end the program.
  6381.  
  6382.           DECLARE FUNCTION KEYMOUSE%
  6383.  
  6384.           GETKEY:
  6385.           A%= KEYMOUSE%
  6386.           PRINT A%
  6387.           IF A% <> 27 THEN GOTO GETKEY
  6388.           END
  6389.  
  6390.           As a key or key combination is pressed the corresponding
  6391.           value will print on the screen.
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.                                        94
  6399.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.  
  6407.  
  6408.  
  6409.                                  RESTRICTIONS
  6410.  
  6411.           ------------------------------------------------------------
  6412.                               UNENHANCED LIBRARY
  6413.                               ------------------
  6414.  
  6415.                    THE UNENHANCED LIBRARY IS OFFERED ON A TRIAL BASIS.
  6416.            IT MAY BE USED FOR EVALUATION.  EXECUTABLE PROGRAMS MADE
  6417.            FROM THE UNENHANCED LIBRARY MAY NOT BE DISTRIBUTED.  IF YOU
  6418.            DECIDE THE ROUTINES ARE USEFUL, REGISTRATION MAY BE
  6419.            ACCOMPLISHED BY VIRTUE OF SECURING THE ENHANCED VERSION.
  6420.            THE UNENHANCED LIBRARY MAY NOT BE ALTERED.  THE UNENHANCED
  6421.            LIBRARY MAY BE DISTRIBUTED, PROVIDED IT IS DISTRIBUTED WITH
  6422.            ALL OF THE FILES INCLUDED IN QWEZ51.ZIP OR PWEZ51.ZIP.
  6423.                   THE FILES, QWEZ51.ZIP OR PWEZ51.ZIP , MAY BE UP-
  6424.            LOADED IN THEIR ENTIRETY TO ANY PUBLIC OR PRIVATE BULLETIN
  6425.            BOARD.  INDIVIDUAL FILES NOT BE UP-LOADED.
  6426.  
  6427.           ------------------------------------------------------------
  6428.                                 ENHANCED VERSION
  6429.                                 -----------------
  6430.  
  6431.                  ALL OF THE SOURCE CODE, OBJECT CODE, AND LIBRARIES
  6432.            INCLUDED IN WINDOWS R-E-Z IS COPYRIGHTED.  COPYING AND
  6433.            DISTRIBUTING ANY OF THE MATERIAL IS PROHIBITED.  PROGRAMS
  6434.            MADE USING ANY OF THE PROCEDURES FROM WINDOWS R-E-Z IN THE
  6435.            EXECUTABLE (.EXE ) FORM MAY BE DISTRIBUTED FREELY BY
  6436.            ORIGINAL PURCHASERS.
  6437.  
  6438.           ------------------------------------------------------------
  6439.                                 COPYRIGHT WARNING
  6440.                                 -----------------
  6441.  
  6442.                  EXTRANEOUS CODE HAS BEEN INSERTED IN THE LIBRARY
  6443.            FILES.   ANY PROGRAM MADE USING THE LIBRARY FILES IS
  6444.            DISTINGUISHABLE AS ORIGINATING FROM WINDOWS R-E-Z.  CONNECT
  6445.            SOFTWARE WILL TAKE APPROPRIATE ACTION IF COPYRIGHT
  6446.            INFRINGEMENT IS DISCOVERED.
  6447.  
  6448.           ------------------------------------------------------------
  6449.                                    DISCLAIMER
  6450.                                    ----------
  6451.  
  6452.               ANY LOSS INCURRED FROM THE USE OF THE PROCEDURES CON-
  6453.           TAINED IN WINDOWS R-E-Z, OR ANY LOSS BELIEVED TO BE CAUSED
  6454.           FROM THE PROCEDURES CONTAINED IN WINDOWS R-E-Z IS NOT THE
  6455.           RESPONSIBILITY OF CONNECT SOFTWARE.  USERS OF WINDOWS R-E-Z
  6456.           ASSUME FULL RESPONSIBILITY FOR THE USE OF ANY PROCEDURES
  6457.           CONTAINED WITHIN.
  6458.  
  6459.           ------------------------------------------------------------
  6460.  
  6461.  
  6462.  
  6463.  
  6464.                                        95
  6465.        Copyright(c) 1988-92 - By: CONNECT Software - All rights reserved.
  6466.  
  6467.  
  6468.  
  6469.